# ToolMint US Econ Rates

> US Treasury Fiscal Data (average interest rates, exchange rates, debt to the penny) + daily Treasury yield curve + BLS CPI — one normalized JSON feed for AI agents. No API keys.

- Status: Coming soon
- Price: $0.01 / call (x402 exact, USDC on Base eip155:8453, payTo 0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5)
- Planned URL: https://toolmint-us-econ-rates-json.toolmint.workers.dev
- OpenAPI: https://toolmint.toolmint.workers.dev/tools/us-econ-rates-json/openapi.json

## Routes

- `GET /rates` $0.01: Latest + history normalized feed
- `GET /rates/latest` $0.01: Latest-only snapshot
- `GET /rates/history` $0.01: History-focused feed

## When to use it

- Get current Treasury par yields (1 month to 30 years), average interest rates on Treasury securities, Debt to the Penny, Treasury FX reporting rates and CPI-U in one call.
- A short history window for each.

Not for: market prices, real-time rates, forecasts or investment advice. This is public reference data, not investment advice.

## Example

```bash
curl -i "https://toolmint-us-econ-rates-json.toolmint.workers.dev/rates/latest"
```

That hostname is the planned Worker name. The tool is **not deployed yet**.

Trimmed response (values illustrative):

```json
{
  "tool": "us-econ-rates-json",
  "version": "0.1.0",
  "query": { "includeHistory": false, "historyDays": 60, "historyMonths": 12,
             "historyQuarters": 2, "startYear": 2024, "endYear": 2026 },
  "partial": true,
  "missing": [ { "section": "cpi", "reason": "BLS CPI not processed (REQUEST_NOT_PROCESSED): ..." } ],
  "latest": {
    "avgInterestRates": { "recordDate": "2026-09-30", "rows": [ { "recordDate": "2026-09-30", "securityType": "...", "security": "...", "avgInterestRatePct": 3.1 } ] },
    "debtToPenny": { "recordDate": "...", "debtHeldByPublic": 0, "intragovernmental": 0, "totalPublicDebtOutstanding": 0 },
    "exchangeRates": { "recordDate": "...", "count": 170, "majors": [ { "country": "Euro Zone", "currency": "Euro", "exchangeRate": 0.9 } ], "sample": [] },
    "yieldCurve": { "date": "2026-10-30", "yields": { "1M": 4.0, "2Y": 4.0, "10Y": 4.2, "30Y": 4.6 } },
    "cpi": null
  },
  "history": null,
  "provenance": {
    "fetchedAt": "2026-10-31T12:00:00.000Z",
    "sources": [ { "source": "api.fiscaldata.treasury.gov", "dataset": "Debt to the Penny", "license": "US Treasury Fiscal Data - U.S. Government work", "fetchedAt": "..." } ],
    "note": "US government public data. Not investment advice. ..."
  },
  "cached": false
}
```

All numbers above are placeholders. Yield tenors in the real output are 1M, 1.5M, 2M, 3M, 4M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y (values can be null). `exchangeRate` is units of foreign currency per 1 USD (Treasury reporting rate, quarterly). CPI series are `CUUR0000SA0` (not seasonally adjusted) and `CUSR0000SA0` (seasonally adjusted).

## Data sources and licence

US Treasury Fiscal Data API, the Treasury daily par yield curve, and the BLS public API (v1, keyless). All US Government public data, no API keys. Cite the source as the response `provenance` shows. Each source's own terms apply.

## Freshness and caching

Complete results are cached in memory for 1 hour (15 minutes for latest-only), CPI for 6 hours. Partial results are never cached. `provenance.fetchedAt` and each source's `fetchedAt` show when data was pulled. Upstream data has its own cadence (CPI is monthly, Treasury yields are daily, Treasury FX rates are quarterly); the tool adds no freshness of its own.

## Limits

- BLS keyless quota makes CPI unreliable at volume; check `partial`.
- At most 10 years of CPI per call.
- `startYear`/`endYear` do not change the Fiscal Data sections (always most recent records).
