# US Treasury Par Yield Curve API

> US Treasury Par Yield Curve API is a paid API for AI agents from x402.donnyautomation.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-01).

Returns the full US Treasury constant-maturity par yield curve for any published business day, including key spreads (2s10s, 3m10y, 5s30s) with explicit yield curve inversion flags.

## Facts

- Endpoint: GET https://x402.donnyautomation.com/treasury?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-treasury-par-yield-curve-api-6d368f67
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s0DOHmw3enONUXkfR68Pk

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-6d368f67
```

Example prompt: Pull the latest US Treasury par yield curve and tell me whether it's inverted — I specifically want the 2s10s, 3m10y, and 5s30s spreads and the explicit inversion flags.

## When to prefer this

Choose this endpoint when you need official US Treasury CMT rates for macro, rates, credit, or risk workflows and want key curve spreads and inversion flags pre-computed rather than deriving them yourself. Prefer it over scraping Treasury.gov directly when you need structured JSON output, reliable null-vs-zero semantics for missing tenors, or programmatic inversion detection without extra computation.

## Known failure modes

- 404 if requested date is not a Treasury publication day (weekend, holiday, or no data), with available date range returned
- 400 if both 'date' and 'latest=1' are supplied simultaneously
- 400 if date format is invalid or unparseable
- Payment failure (402) if USDC payment is not included or insufficient

## How this service works

US Treasury par yield curve, every constant maturity from 1 month to 30 years for a published business day. Returns curve[] with tenor, months and percent, spreads (2s10s, 3m10y, 5s30s) and an explicit inversion flag - the real question is whether the curve is inverted, not what fourteen numbers are. A tenor Treasury did not publish is null, never zero. Pass ?latest=1 OR ?date=YYYY-MM-DD, not both. Errors: 400 conflicting_params|bad_latest|bad_date, 404 no_curve with the available range.

## Output

A structured JSON object containing all published US Treasury constant-maturity par yield rates from 1-month to 30-year for the requested business day, key spreads (2s10s, 3m10y, 5s30s) pre-computed, an explicit boolean inversion flag per spread, and null (not zero) for any tenor the Treasury did not publish that day. Returns 404 with available date range if a non-publication day is requested.

## 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",
       "description": "YYYY-MM-DD business day, for a specific past day. A non-publication day returns 404 with the available range, not the nearest guess."
      },
      "latest": {
       "type": "string",
       "description": "Pass latest=1 for the most recent published curve. Use instead of date, not with it."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": "2026-08-03T00:00:00.000Z",
  "date": "2026-08-03",
  "curve": [
   {
    "tenor": "3 Mo",
    "months": 3,
    "percent": 3.91
   },
   {
    "tenor": "2 Yr",
    "months": 24,
    "percent": 4.25
   },
   {
    "tenor": "10 Yr",
    "months": 120,
    "percent": 4.7
   }
  ],
  "spreads": {
   "unit": "percentage points",
   "2s10s": 0.45,
   "3m10y": 0.79,
   "5s30s": 0.83
  },
  "isLatest": true,
  "inversion": {
   "2s10s": false,
   "3m10y": false,
   "anyInverted": false
  },
  "attribution": "Daily Treasury Par Yield Curve Rates, U.S. Department of the Treasury (public domain)."
 }
}
```

## More

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