# US Treasury Yield Spread

> US Treasury Yield Spread is a paid API for AI agents from treasury-macro.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Returns the spread between two selected Treasury maturities (e.g. 2Y vs 10Y), with recent daily history and an inverted/normal curve verdict.

## Facts

- Endpoint: GET https://treasury-macro.x402tookit.com/us-yield-spread?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-treasury-yield-spread-7e5ccca8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hk508Nk8nHbQLx022_Haj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability us-treasury-yield-spread-7e5ccca8
```

Example prompt: What's the current yield spread between the 2-year and 10-year Treasury, and is the curve inverted or normal right now?

## When to prefer this

Use this endpoint when you need a focused, precomputed spread between exactly two Treasury maturities with an opinionated inverted/normal verdict and multi-day history. Prefer this over the full yield curve endpoint when you only care about a specific maturity pair (e.g. 2s10s or 3m10y) and want the inversion count and verdict included automatically.

## Known failure modes

- Missing or invalid 'short' or 'long' query parameters returns an error
- If 'short' maturity is longer than 'long' maturity, results may be semantically incorrect
- Treasury data source unavailable may return degraded mode with stale data
- Unsupported maturity codes (e.g. typos) cause validation failures
- Network or payment (x402) failure prevents response

## How this service works

Spread between two Treasury maturities (for example 2Y and 10Y) now and over recent days, with inverted/normal verdict.

## Output

Returns the current spread value between the two specified Treasury maturities, individual yield levels for each maturity, a time series of recent daily spread readings, the number of days the curve has been inverted, a plain-language verdict (inverted vs normal), a summary explanation, and source attribution. May include a degraded flag and disclaimer if data is stale or partial.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "short",
      "long"
     ],
     "properties": {
      "long": {
       "type": "string",
       "description": "Longer maturity, same list"
      },
      "short": {
       "type": "string",
       "description": "Shorter maturity: 1M 2M 3M 4M 6M 1Y 2Y 3Y 5Y 7Y 10Y 20Y 30Y"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "long": {
       "type": [
        "null",
        "string"
       ]
      },
      "short": {
       "type": [
        "null",
        "string"
       ]
      },
      "latest": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "date": {
         "type": [
          "null",
          "string"
         ]
        },
        "long": {
         "type": [
          "null",
          "number"
         ]
        },
        "short": {
         "type": [
          "null",
          "number"
         ]
        },
        "spread": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "recent": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": [
           "null",
           "string"
          ]
         },
         "long": {
          "type": [
           "null",
           "number"
          ]
         },
         "short": {
          "type": [
           "null",
           "number"
          ]
         },
         "spread": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {

… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-treasury-yield-spread-7e5ccca8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from treasury-macro.x402tookit.com](https://www.zero.xyz/host/treasury-macro.x402tookit.com/llms.txt)
