# x402stock Treasury Yields

> x402stock Treasury Yields is a paid API for AI agents from agents.x402stock.xyz, paid per call via x402 or MPP, $0.01/call, status healthy (last checked 2026-10-03, last successful call 2026-10-02).

Retrieves US Treasury yield data (yield curve, rates by maturity) for use by AI agents, paid per request in USDC via x402.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/treasury-yields?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402, MPP
- Status: healthy
- Last checked: 2026-10-03
- Last successful call: 2026-10-02
- Success rate: 100% of calls made through Zero
- Rating: 4.7 / 5 from 1 review
- Activations on Zero: 4
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-treasury-yields-98bb53e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uGjA8n_pbinz41OQZ2yXu

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 x402stock-treasury-yields-98bb53e0
```

Example prompt: Can you pull the current US Treasury yield curve — I want to see rates across all maturities from 1-month to 30-year?

## When to prefer this

Choose this endpoint when you need authoritative US Treasury yield data for macro analysis, bond market research, risk-free rate inputs, or yield curve monitoring — particularly in an agent workflow that can pay autonomously per call in USDC without requiring API key management.

## Known failure modes

- Insufficient USDC balance causes payment failure and blocked response
- Invalid or malformed properties filter returns 400 error
- Data temporarily unavailable from upstream source returns 503
- Rate limiting if too many rapid successive calls

## How this service works

The daily US Treasury par yield curve (Constant Maturity Treasury rates) for every maturity from 1 month to 30 years, in percent. Defaults to the latest published day; pass `?limit=` for more recent days (max 250) and `?year=YYYY`. No ticker needed. Use for the risk-free rate, rate-sensitivity context, and yield-curve inversion in macro-aware analysis. From x402stock

## Output

Returns US Treasury yield data across maturities (e.g. 1-month, 3-month, 6-month, 1-year, 2-year, 5-year, 7-year, 10-year, 20-year, 30-year), including current rates and potentially historical time series, enabling yield curve analysis and macro research.

## 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",
     "properties": {
      "year": {
       "type": "integer",
       "maximum": 2100,
       "minimum": 1990
      },
      "limit": {
       "type": "integer",
       "default": 1,
       "maximum": 250,
       "exclusiveMinimum": 0
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "source",
  "as_of",
  "series",
  "unit",
  "maturities",
  "count",
  "rates"
 ],
 "properties": {
  "unit": {
   "type": "string"
  },
  "as_of": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "count": {
   "type": "number"
  },
  "rates": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "date",
     "rates"
    ],
    "properties": {
     "date": {
      "type": "string"
     },
     "rates": {
      "type": "object",
      "propertyNames": {
       "type": "string"
      },
      "additionalProperties": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      }
     }
    },
    "additionalProperties": false
   }
  },
  "series": {
   "type": "string"
  },
  "source": {
   "type": "string",
   "const": "us_treasury"
  },
  "maturities": {
   "type": "array",
   "items": {
    "type": "string"
   }
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-treasury-yields-98bb53e0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.x402stock.xyz](https://www.zero.xyz/host/agents.x402stock.xyz/llms.txt)
