# US Treasury Par Yield Curve API

> US Treasury Par Yield Curve API is a paid API for AI agents from x402-apis.pages.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Returns official US Treasury daily par yield curve rates (1 month to 30 years) and key spreads (10Y-2Y, 10Y-3M) for any business day since 1990

## Facts

- Endpoint: GET https://x402-apis.pages.dev/v1/treasury-yields?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-treasury-par-yield-curve-api-9ef32804
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UgRFNlYDqD_5cBBWqDySU

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-par-yield-curve-api-9ef32804
```

Example prompt: What does the US Treasury yield curve look like today — give me the full curve from 1 month to 30 years along with the 10Y-2Y and 10Y-3M spreads.

## When to prefer this

Use this endpoint when you need authoritative, official US Treasury yield data — for risk-free rate inputs to DCF models, yield curve shape analysis, recession indicator monitoring (inverted curve), or any context requiring a citable government source. Prefer this over financial data aggregators when source credibility and official accuracy matter. It covers every standard maturity from 1 month to 30 years and includes pre-computed spreads, saving calculation steps.

## Known failure modes

- HTTP 400 returned for invalid or unparseable date input before any payment is charged
- Date before 1990-01-02 returns an error as data is unavailable
- Weekend/holiday dates are handled gracefully by returning the prior business day (not an error)
- Service outage: not charged if the endpoint is unavailable
- Future dates will return an error or empty data as no curve has been published

## How this service works

Use when an agent needs US government bond yields, a risk-free rate or the yield curve (e.g. 2Y/10Y spread, recession signal, discounting): official US Treasury daily par yield curve, 1 month to 30 years, latest or any day since 1990 (weekends/holidays return the previous business day). Includes 10Y-2Y and 10Y-3M spreads. Source named in every answer. Bad input: HTTP 400 before payment; outage is not charged.

## Output

A JSON object containing the effective date, a yieldsPct object with par yields across all standard maturities (1M, 2M, 3M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y), and a spreadsPct object including the 10Y-2Y and 10Y-3M spreads. Weekend and holiday dates automatically return the previous business day's data. Source attribution is included in every response.

## 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",
     "properties": {
      "date": {
       "type": "string",
       "description": "Day as YYYY-MM-DD (1990-01-02 or later). Default: latest published curve."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "date",
      "yieldsPct"
     ],
     "properties": {
      "date": {
       "type": "string"
      },
      "yieldsPct": {
       "type": "object"
      },
      "spreadsPct": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-treasury-par-yield-curve-api-9ef32804/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-apis.pages.dev](https://www.zero.xyz/host/x402-apis.pages.dev/llms.txt)
