X

X402stock · National Debt

by X402stock

GETBase

$0.01

per call · USD Coin on Base

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

Endpoint

GET https://x402stock.xyz/api/v1/national-debt

6

Calls / 30d

5

Unique payers / 30d

Sep 8

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://x402stock.xyz/api/v1/national-debt", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://x402stock.xyz/api/v1/national-debt?limit=30" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "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"
}

Payment details

Pay to0x3070fbb3803819fb5bdfe9286fdc6325a877fa85
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Other and the homepage with a featured placement.

Get featured →

More from X402stock & similar services