Microproduct data guidebeginner

Treasury Debt to the Penny

Daily U.S. public debt outstanding for building national-debt monitors and fiscal-dashboard prototypes.

At a glance

Difficulty
Beginner — comfortable for a first prototype
Size
Tiny · ≤0.05 GB
Formats
JSON, CSV, XML
Access
API or Download
API key
Not required
Provider
U.S. Department of the Treasury Bureau of the Fiscal Service
Updates
Daily

From source to product signal

Test a product idea in four steps

Fiscal Data reports total public debt outstanding each business day, split into debt held by the public and intragovernmental holdings. Start with the latest 30 records. This is debt outstanding, not a deficit, and other Fiscal Data tables calculate TPDO slightly differently.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the data

  1. 1.Open the Debt to the Penny dataset page and copy the API endpoint.
  2. 2.Request the latest records sorted by record date descending.
  3. 3.Keep record date, debt held by the public, and total public debt outstanding.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/debt_to_penny",
    params={
        "fields": "record_date,debt_held_public_amt,intragov_hold_amt,tot_pub_debt_out_amt",
        "sort": "-record_date",
        "page[size]": 30,
    },
    timeout=30,
)
response.raise_for_status()
debt = pd.DataFrame(response.json()["data"])
debt["record_date"] = pd.to_datetime(debt["record_date"])
debt["tot_pub_debt_out_amt"] = pd.to_numeric(debt["tot_pub_debt_out_amt"])
print(debt.head())
4

Test a useful signal

Chart recent total public debt

Test whether daily TPDO can power a bounded national-debt sparkline.

  1. 01Convert amounts to numbers and sort by record date.
  2. 02Plot total public debt outstanding and the public versus intragovernmental split.
  3. 03Explain that TPDO is not the deficit and that other Fiscal Data tables treat Federal Financing Bank debt differently.

Dataset details

U.S. Department of the Treasury Bureau of the Fiscal Service is a government source. Last verified 2026-08-18. Temporal coverage: 1993-present daily totals with earlier incomplete splits.

Theme

Markets & Economics

Domains

Public FinanceFixed IncomeMacroeconomics

Data types

Time SeriesTabular

Tasks

Fiscal MonitoringTrend AnalysisDashboarding

Geography

United States

Formats

JSONCSVXML

Provider

U.S. Department of the Treasury Bureau of the Fiscal Service

Data terms

U.S. Government public data / federal copyright guidance