# US Treasury Yield Curve

> US Treasury Yield Curve is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-22).

Returns the official US Treasury par yield curve for a specified date or recent date range, including per-tenor yields, spreads, inversion flags, and historical changes.

## Facts

- Endpoint: GET https://1gateway.dev/v1/macro/treasury-curve?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-treasury-yield-curve-673e739c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9OM0BPeQBQ4Dr1zf_rhSW

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-curve-673e739c
```

Example prompt: Pull the US Treasury par yield curve for the last 5 business days and tell me if the 2s10s or 3m10y spread is inverted, and by how many basis points.

## When to prefer this

Use this endpoint when you need official US Treasury par yield curve data for macro analysis, fixed-income research, or monitoring yield curve inversions. It is preferable over general financial data APIs when you specifically need the official Treasury par yields across all standard tenors with pre-computed spread and inversion metrics, and when you need up to a year of daily history without building your own aggregation layer.

## Known failure modes

- Invalid date format returns an error — must be YYYY-MM-DD
- Days value outside 1-366 returns a validation error
- Dates with no Treasury data (very old dates) may return empty or error
- Weekend/holiday dates silently fall back to the prior business day, which may surprise callers expecting an exact date match
- Network or upstream Treasury data unavailability may cause stale or cached responses (cached flag in response indicates this)

## How this service works

Use when an agent needs the official US Treasury par yield curve for a day or a recent stretch. Input: optional date (YYYY-MM-DD, default latest), days (1-366 history ending at date). Output: JSON yields per tenor (1m to 30y, percent), 2s10s and 3m10y spreads in bp, inversion flags, change over the range, history. Weekend or holiday dates fall back to the prior business day. Example: ?days=5

## Output

A JSON object containing: the queried date and actual curve date (adjusted for weekends/holidays), yields for all standard Treasury tenors (1m, 2m, 3m, 4m, 6m, 6w, 1y, 2y, 3y, 5y, 7y, 10y, 20y, 30y) in percent, 2s10s and 3m10y spreads in basis points, inversion flags, change in key yields and spreads over the requested date range, and a history array of daily curve snapshots.

## 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": [],
     "properties": {
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "Curve date YYYY-MM-DD (default latest published; no curve that day → previous business day)"
      },
      "days": {
       "type": "integer",
       "maximum": 366,
       "minimum": 1,
       "description": "Business days of history ending at date (default 1)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "query",
      "asOf",
      "exactDate",
      "unit",
      "latest",
      "change",
      "inverted",
      "history"
     ],
     "properties": {
      "asOf": {
       "type": "string"
      },
      "unit": {
       "type": "string"
      },
      "query": {
       "type": "object",
       "properties": {
        "date": {
         "type": "null"
        },
        "days": {
         "type": "integer"
        }
       },
       "additionalProperties": true
      },
      "change": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "to": {
         "type": "string"
        },
        "from": {
         "type": "string"
        },
        "2s10sBp": {
         "type": "integer"
        },
        "tenYearBp": {
         "type": "integer"
        },
        "twoYearBp": {
         "type": "integer"
        }
       },
       "additionalProperties": true
      },
      "latest": {
       "type": "object",
       "properties": {
        "date": {
         "type": "string"
        },
        "yields": {
         "type": "object",
         "additionalProperties": true
        },
        "spreads": {
         "type": "object",
         "additionalProperties": true
        }
       },
       "additionalProperties": true
      },
      "history": {
       "type": "array",
       "items": {
        "type": "objec
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-treasury-yield-curve-673e739c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
