Back to Claude Scientific Skills

Fiscal Statement Datasets — U.S. Treasury Fiscal Data

scientific-skills/usfiscaldata/references/datasets-fiscal.md

2.38.07.0 KB
Original Source

Fiscal Statement Datasets — U.S. Treasury Fiscal Data

Daily Treasury Statement (DTS)

The DTS dataset has 9 data tables, all under /v1/accounting/dts/. Updated daily (business days).

Date Range: October 2005 to present

DTS Tables

TableEndpointDescription
Operating Cash Balance/v1/accounting/dts/operating_cash_balanceTreasury General Account balance
Deposits & Withdrawals/v1/accounting/dts/deposits_withdrawals_operating_cashChanges to TGA
Public Debt Transactions/v1/accounting/dts/public_debt_transactionsIssues and redemptions of securities
Adjustment of Public Debt/v1/accounting/dts/adjustment_public_debt_transactions_cash_basisCash basis adjustments
Debt Subject to Limit/v1/accounting/dts/debt_subject_to_limitDebt vs. statutory limit
Inter-Agency Tax Transfers/v1/accounting/dts/inter_agency_tax_transfersIntra-government tax transfers
Federal Tax Deposits/v1/accounting/dts/federal_tax_depositsTax deposit activity
Short-Term Cash Investments/v1/accounting/dts/short_term_cash_investmentsCash investment activity
Income Tax Refunds Issued/v1/accounting/dts/income_tax_refunds_issuedTax refund issuances

Common DTS Fields

FieldTypeDescription
record_dateDATEBusiness date
account_typeSTRINGAccount/balance type
open_today_balCURRENCYOpening balance
open_month_balCURRENCYOpening month balance
open_fiscal_year_balCURRENCYOpening fiscal year balance
close_today_balCURRENCYClosing balance
transaction_today_amtCURRENCYToday's transaction amount
transaction_mtd_amtCURRENCYMonth-to-date amount
transaction_fytd_amtCURRENCYFiscal year-to-date amount
python
# Get current Treasury General Account (TGA) balance
resp = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/dts/operating_cash_balance",
    params={"sort": "-record_date", "page[size]": 5}
)
for row in resp.json()["data"]:
    print(f"{row['record_date']}: ${float(row['close_today_bal']):,.0f}M (closing balance)")

# Get deposits and withdrawals for a specific period
resp = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/dts/deposits_withdrawals_operating_cash",
    params={
        "filter": "record_date:gte:2024-01-01,record_date:lte:2024-01-31",
        "sort": "record_date",
        "page[size]": 1000
    }
)

Aggregation Example (DTS)

python
# Get sum of today's transaction amounts by transaction type
resp = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/dts/deposits_withdrawals_operating_cash",
    params={
        "fields": "record_date,transaction_type,transaction_today_amt",
        "filter": "record_date:eq:2024-01-15"
    }
)

Monthly Treasury Statement (MTS)

The MTS dataset has 16 data tables, all under /v1/accounting/mts/. Updated monthly.

Date Range: October 1980 to present

MTS Tables

TableEndpointDescription
MTS Table 1/v1/accounting/mts/mts_table_1Summary of Receipts and Outlays
MTS Table 2/v1/accounting/mts/mts_table_2Receipts by Source
MTS Table 3/v1/accounting/mts/mts_table_3Outlays by Function
MTS Table 4/v1/accounting/mts/mts_table_4Outlays by Agency
MTS Table 5/v1/accounting/mts/mts_table_5Outlays by Category
MTS Table 6/v1/accounting/mts/mts_table_6Means of Financing
MTS Table 7/v1/accounting/mts/mts_table_7Receipts by Source (Quarterly)
MTS Table 8/v1/accounting/mts/mts_table_8Outlays by Function (Quarterly)
MTS Table 9/v1/accounting/mts/mts_table_9Receipts: Comparative Summary
MTS Table 10/v1/accounting/mts/mts_table_10Outlays: Comparative Summary
MTS Table 11/v1/accounting/mts/mts_table_11Supplemental Detail on Receipts
MTS Table 12/v1/accounting/mts/mts_table_12Supplemental Detail on Outlays
MTS Table 13/v1/accounting/mts/mts_table_13Federal Borrowing and Debt
MTS Table 14/v1/accounting/mts/mts_table_14Means of Financing: Federal
MTS Table 15/v1/accounting/mts/mts_table_15Federal Trust Fund Summary
MTS Table 16/v1/accounting/mts/mts_table_16Means of Financing: Off-Budget

Common MTS Fields

FieldTypeDescription
record_dateDATEMonth end date
record_fiscal_yearSTRINGFiscal year (Oct–Sep)
record_fiscal_quarterSTRINGFiscal quarter (1–4)
classification_descSTRINGLine item description
classification_idSTRINGLine item code
parent_idSTRINGParent classification ID
current_month_gross_rcpt_amtCURRENCYCurrent month gross receipts
current_fytd_gross_rcpt_amtCURRENCYFiscal year-to-date gross receipts
prior_fytd_gross_rcpt_amtCURRENCYPrior year fiscal-year-to-date
python
# MTS Table 1: Summary of receipts and outlays
resp = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/mts/mts_table_1",
    params={
        "filter": "record_fiscal_year:eq:2024",
        "sort": "record_date"
    }
)
df = pd.DataFrame(resp.json()["data"])

# MTS Table 9: Get line 120 (Total Receipts) for most recent period
resp = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/mts/mts_table_9",
    params={
        "filter": "line_code_nbr:eq:120",
        "sort": "-record_date",
        "page[size]": 1
    }
)

U.S. Government Revenue Collections

Endpoint: /v1/accounting/od/rev_collections
Frequency: Daily
Date Range: October 2004 to present

Daily tax and non-tax revenue collections.


Financial Report of the U.S. Government

Endpoint: (8 tables)
Frequency: Annual
Date Range: September 1995 to present (FY2024 latest)

Annual audited financial statements. Includes:

  • Balance sheets
  • Statement of net cost
  • Statement of operations
  • Statement of changes in net position

Monthly Treasury Disbursements

Frequency: Monthly
Date Range: October 2013 to present

Monthly federal disbursements data.


Receipts by Department

Endpoint: /v2/accounting/od/receipts_by_dept
Frequency: Annual
Date Range: September 2015 to present

Annual breakdown of federal receipts by department.


Treasury Managed Accounts

Frequency: Quarterly
Date Range: December 2022 to present (3 data tables)

Treasury-managed trust and special funds account data.


Treasury Bulletin

Frequency: Quarterly
Date Range: March 2021 to present (13 tables)

Quarterly financial report covering government finances, public debt, savings bonds, and more.

Endpoint prefix: /v1/accounting/od/treasury_bulletin_