82trust / 100

Treasury Rates

by treasury-rates in Security & trust

x402 APIPassing, checked 3 h ago

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.

GET https://api.agentstools.dev/treasury/rates

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
26 ms typical, 26 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.agentstools.dev/treasury/rates?year=2026"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.agentstools.dev%2Ftreasury%2Frates
const res = await pay("https://api.agentstools.dev/treasury/rates?year=2026");
console.log(await res.json());

Example input

{
  "year": 2026
}

Example output

{
  "attribution": [
    "Source: U.S. Department of the Treasury, Fiscal Data (public domain)"
  ],
  "average_interest_rates": {
    "rates": [
      {
        "avg_interest_rate": 3.706,
        "security": "Treasury Bills",
        "security_type": "Marketable"
      }
    ],
    "record_date": "2026-06-30",
    "unit": "percent"
  },
  "computed": {
    "inverted_2s10s": false,
    "spread_2s10s": 0.48
  },
  "par_yield_curve": {
    "date": "2026-07-09",
    "points": {
      "10y": 4.21,
      "2y": 3.73,
      "30y": 4.79
    },
    "unit": "percent"
  },
  "yield_curve_available": true
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40226 ms$0.015