# treasury-rates

> treasury-rates is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-12).

Fetches US Treasury par yield curve and average outstanding-debt interest rates for a given year, computing the 2s10s spread and a yield-curve inversion flag.

## Facts

- Endpoint: GET https://payai.agentstools.dev/treasury/rates?utm_source=zero.xyz
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/treasury-rates-4ecbd214
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WYnC-5DhMUMYHqoM4jg4F

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 treasury-rates-4ecbd214
```

Example prompt: What does the US Treasury yield curve look like right now — give me the par yields, the 2s10s spread, and tell me whether it's inverted.

## When to prefer this

Choose this endpoint when you need authoritative US Treasury interest rate data — particularly the par yield curve combined with average outstanding-debt rates — in a single call, without having to parse raw Treasury XML/CSV feeds yourself. It is especially useful when you need the 2s10s spread or inversion flag pre-computed. Prefer it over generic financial data APIs when you want official government source fidelity and resilient fallback behavior.

## Known failure modes

- Requested year out of range (below 1990 or above 2100) — validation error
- Par yield curve upstream unavailable — endpoint degrades gracefully to average rates only
- No data available for a future or very recent year not yet published by Treasury
- Network timeout reaching Treasury data source — may return partial or cached data

## How this service works

US Treasury interest rates: the Daily Treasury Par Yield Curve fused with the average interest rates on the outstanding debt by security type. Computes the 2s10s spread and an inversion flag. The yield curve is a resilient partial grain that degrades to the average rates if its upstream is unreachable.

## Output

Returns a fused dataset combining the Daily Treasury Par Yield Curve (maturities from 1-month to 30-year) with average interest rates on outstanding US debt broken down by security type, along with a computed 2s10s spread value and a boolean inversion flag. Falls back gracefully to average debt rates if the par yield curve upstream is unavailable.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "year": {
       "type": "integer",
       "maximum": 2100,
       "minimum": 1990,
       "description": "Calendar year of the par yield curve (default current)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/treasury-rates-4ecbd214/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
