# US Treasury Fiscal Data API (x402)

> US Treasury Fiscal Data API (x402) is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-15).

Returns current US total public debt and average interest rates by security type, sourced from fiscaldata.treasury.gov, payable per-call in USDC via x402.

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/gov/treasury
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-treasury-fiscal-data-api-x402-644a4400
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ePWrwWIEJrpK88qRgpaKU

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-fiscal-data-api-x402-644a4400
```

Example prompt: What's the current US total public debt and the average interest rate on Treasury Bills right now, according to fiscaldata.treasury.gov?

## When to prefer this

Use this endpoint when you need a quick, no-signup, per-call machine-payable lookup of current US national debt totals and Treasury interest rate averages. Prefer this over direct fiscaldata.treasury.gov calls when operating in an x402 agentic payment context with no API key infrastructure. Best for real-time macroeconomic context injection into agent workflows.

## Known failure modes

- Upstream fiscaldata.treasury.gov outage returns stale or error response
- Payment failure (402) if USDC balance is insufficient or x402 not configured
- Data may lag by one business day if Treasury hasn't published latest figures
- Malformed response if Treasury API schema changes upstream

## How this service works

Machine-payable data APIs for AI agents — 35 endpoints across web search, on-chain reads, trading data, and AI-visibility. Pay per call in USDC via x402 on Base. No API keys, no signup.

## Output

A JSON object with the as-of date, data source attribution, total US public debt in USD (e.g. ~$37 trillion), and an array of average interest rates broken down by security type (e.g. Treasury Bills at 3.69%).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-05-31",
  "source": "fiscaldata.treasury.gov",
  "avg_interest_rates": [
   {
    "rate_pct": 3.69,
    "security": "Treasury Bills"
   }
  ],
  "total_public_debt_usd": 37000000000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-treasury-fiscal-data-api-x402-644a4400/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
