81trust / 100

Treasury Debt

by treasury-debt in Other

x402 APIPassing, checked 3 h ago

US federal debt from the Treasury Debt to the Penny series, split into debt held by the public and intragovernmental holdings, fused with interest expense on the debt. Returns the latest value, the history over a window and computed net issuance plus public and intragovernmental shares. Values are cited to Treasury Fiscal Data.

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

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/debt?days=30"
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%2Fdebt
const res = await pay("https://api.agentstools.dev/treasury/debt?days=30");
console.log(await res.json());

Example input

{
  "days": 30
}

Example output

{
  "attribution": [
    "Source: U.S. Department of the Treasury, Fiscal Data (public domain)"
  ],
  "computed": {
    "intragovernmental_share": 0.1954,
    "net_issuance_over_window": 152340000000,
    "public_share": 0.8046,
    "to_date": "2026-07-09"
  },
  "latest": {
    "debt_held_by_public": 31709399350223.4,
    "intragovernmental_holdings": 7704779665906.69,
    "record_date": "2026-07-09",
    "total_public_debt": 39414179016130.09
  },
  "series": "debt_to_penny",
  "unit": "USD",
  "window_days": 30
}

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.01