82trust / 100
National Debt
by x402stock.xyz in Markets & finance
x402 APIPassing, checked 17 min ago
The total US public debt outstanding to the penny — the headline national-debt figure — split into debt held by the public and intragovernmental holdings, with the latest value, prior business day, day-over-day change, and recent history. No ticker needed. Updates each business day. Sourced from the US Treasury (FiscalData). Pass `?limit=` for more history (default 30, max 250). From x402stock
GET https://x402stock.xyz/api/v1/national-debt
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 200 ms typical, 200 ms slowest 5%
- Last check
- 17 min ago
- Next check
- in 11 min
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://x402stock.xyz/api/v1/national-debt?limit=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.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402stock.xyz%2Fapi%2Fv1%2Fnational-debt
const res = await pay("https://x402stock.xyz/api/v1/national-debt?limit=30");
console.log(await res.json());Example input
{
"limit": 30
}Example output
{
"as_of": "2026-06-03T00:00:00.000Z",
"change": -17009871036.65,
"change_percent": -0.0434,
"history": [
{
"date": "2026-06-03",
"debt_held_by_public": 31599703500408.55,
"intragovernmental_holdings": 7605271214840.1,
"total_public_debt_outstanding": 39204974715248.65
}
],
"latest": {
"date": "2026-06-03",
"debt_held_by_public": 31599703500408.55,
"intragovernmental_holdings": 7605271214840.1,
"total_public_debt_outstanding": 39204974715248.65
},
"prior": {
"date": "2026-06-02",
"debt_held_by_public": 31597886394124.88,
"intragovernmental_holdings": 7624098192160.42,
"total_public_debt_outstanding": 39221984586285.3
},
"series": "debt_to_penny",
"source": "us_treasury",
"unit": "usd"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 17 min ago | Passed | 402 | 373 ms | $0.01 |
| 5 h ago | Passed | 402 | 200 ms | $0.01 |