Pull the daily debt-to-the-penny feed from the Treasury Fiscal Data API and track total public debt outstanding

domain: fiscaldata.treasury.gov · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. No API key is required; construct a GET request to https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/debt_to_penny
  2. Add query params: fields=record_date,tot_pub_debt_out_amt,debt_held_public_amt,intragov_hold_amt; sort=-record_date; page[size]=1 to get the latest record
  3. For a date range, add filters[record_date:gte]=YYYY-MM-DD and filters[record_date:lte]=YYYY-MM-DD
  4. Parse the JSON response: data array contains string-typed numeric fields; cast tot_pub_debt_out_amt to a decimal before arithmetic
  5. Set up a daily scheduled job hitting the endpoint after 3:00 PM ET, when Treasury typically publishes the prior business day's figures
  6. For historical bulk loads, use the page[number] parameter starting at 1 and increment until meta.total-pages is reached; the dataset covers from 1993 onward

Known gotchas

Related routes

Query the Daily Treasury Statement dataset via the Treasury Fiscal Data API
fiscaldata.treasury.gov · 5 steps · unrated
Retrieve the Monthly Statement of the Public Debt (MSPD) summary tables via the Treasury Fiscal Data API for debt composition analysis
fiscaldata.treasury.gov · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans