Query the U.S. Treasury Fiscal Data REST API for federal financial data. No API key required. Use for national debt (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates, foreign exchange rates, savings bonds,
Installs just this skill. Get the whole plugin for auto-invocation.
⚡ How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/usfiscaldata
👁️ Context preview
The summary Claude sees to decide when to auto-load this skill.
Query the U.S. Treasury Fiscal Data REST API for federal financial data. No API key required. Use for national debt (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates, foreign exchange rates, savings bonds,
📊 Stats
Stars31,545
Forks3,146
LanguagePython
LicenseMIT
📦 Ships with scientific-agent-skills
</> SKILL.md
usfiscaldata.SKILL.md
---name: usfiscaldata
description: Query the U.S. Treasury Fiscal Data REST API for federal financial data. No API key required. Use for national debt (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates, foreign exchange rates, savings bonds, or U.S. government revenue and spending statistics.
license: MIT
allowed-tools: Read Write Edit Bash
metadata: {"version": "1.1", "skill-author": "K-Dense Inc."}
---# U.S. Treasury Fiscal Data API
Free, open REST API from the U.S. Department of the Treasury for federal financial data. No API key or registration required.
**Base URL:** `https://api.fiscaldata.treasury.gov/services/api/fiscal_service`
Browse [54 datasets and 179 data tables](https://fiscaldata.treasury.gov/datasets/) via the dataset search. Verify endpoint paths on each dataset's API Quick Guide — paths change over time.
## Installation
```bash
uv pip install requests pandas
```
## Quick Start
```python
import requests
import pandas as pd
BASE_URL = "https://api.fiscaldata.treasury.gov/services/api/fiscal_service"
# Get the current national debt (Debt to the Penny)
resp = requests.get(f"{BASE_URL}/v2/accounting/od/debt_to_penny", params={
**Note:** All values are returned as strings. Convert as needed (e.g., `float()`, `pd.to_datetime()`). Null values appear as the string `"null"`.
## Common Patterns
### Load all pages into a DataFrame
Use the bounded `fetch_all()` helper in [parameters.md](references/parameters.md). For small result sets, a single request with `page[size]=10000` may suffice when `meta.total-pages` is 1.