# US Debt Composition API
> What the US national debt is actually made of, served from the Treasury's Monthly Statement of the Public Debt. The headline debt-to-the-penny figure is one number; this is the breakdown — how the roughly $39 trillion splits across Treasury Bills, Notes, Bonds, TIPS and Floating-Rate Notes (the marketable, tradable debt) versus the non-marketable debt (the Government Account Series held by federal trust funds, Savings Bonds, and State and Local Government Series). The composition endpoint returns the latest full breakdown by security class, each with its share of the total and its split between debt held by the public and intragovernmental holdings. The marketable endpoint isolates the tradable securities (Bills/Notes/Bonds/TIPS/FRN) with each one's share of marketable debt — the issuance mix that rates traders and the Treasury's quarterly refunding watch. The history endpoint returns one security class's outstanding amount month by month. This is the debt-structure data-cut, distinct from the debt-to-the-penny total, the fiscal-deficit and the yield-curve APIs in the catalogue. Live, updated monthly, no key on the upstream, nothing stored.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/debtcomposition-api/..."
```

## Pricing
- **Free** (Free) — 31,000 calls/Mo, 5 req/s
- **Starter** ($6/Mo) — 340,000 calls/Mo, 15 req/s
- **Pro** ($18/Mo) — 1,420,000 calls/Mo, 40 req/s
- **Scale** ($42/Mo) — 5,100,000 calls/Mo, 100 req/s

## Endpoints

### Debt

#### `GET /v1/composition` — Latest full debt breakdown by security class

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtcomposition-api/v1/composition"
```

**Response:**
```json
{
    "data": {
        "date": "2026-05-31",
        "count": 11,
        "source": "US Treasury (MSPD)",
        "composition": [
            {
                "share_pct": 40.66,
                "amount_busd": 15942.7,
                "amount_musd": 15942721.4171,
                "security_type": "Marketable",
                "security_class": "Notes",
                "held_by_public_busd": 15939.4,
                "intragovernmental_busd": 3.3
            },
            {
                "share_pct": 20.51,
                "amount_busd": 8039.7,
                "amount_musd": 8039717.26834849,
                "security_type": "Nonmarketable",
                "security_class": "Government Account Series",
                "held_by_public_busd": 366.8,
                "intragovernmental_busd": 7672.9
            },
            {
                "share_pct": 17.24,
                "amount_busd": 6758.8,
                "amount_musd": 6758778.5857,
                "security_type": "Marketable",
                "security_class": "Bills",
                "held_by_public_busd": 6758.3,
                "intragovernmental_busd": 0.5
            },
            {
                "share_pct": 13.8,
                "amount_busd": 5412.1,
                "amount_musd": 5412096.5247,
                "security_type": "Marketable",
                "security_class": "Bonds",
                "held_by_public_busd": 5401.1,
                "intragovernmental_busd": 11
            },
          
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/history` — One security class outstanding month by month

**Parameters:**
- `class` (query, optional, string) — total, marketable, nonmarketable, bills, notes, bonds, tips, frn, savings, gas Example: `bills`
- `months` (query, optional, string) — Number of recent months (max 240) Example: `24`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtcomposition-api/v1/history?class=bills&months=24"
```

**Response:**
```json
{
    "data": {
        "count": 24,
        "source": "US Treasury (MSPD)",
        "history": [
            {
                "date": "2024-06-30",
                "amount_busd": 5765.8,
                "amount_musd": 5765830.0899
            },
            {
                "date": "2024-07-31",
                "amount_busd": 5915.8,
                "amount_musd": 5915782.1837
            },
            {
                "date": "2024-08-31",
                "amount_busd": 6121.8,
                "amount_musd": 6121801.8453
            },
            {
                "date": "2024-09-30",
                "amount_busd": 6004.8,
                "amount_musd": 6004760.6777
            },
            {
                "date": "2024-10-31",
                "amount_busd": 6186.8,
                "amount_musd": 6186777.7925
            },
            {
                "date": "2024-11-30",
                "amount_busd": 6389.8,
                "amount_musd": 6389763.232
            },
            {
                "date": "2024-12-31",
                "amount_busd": 6186.9,
                "amount_musd": 6186882.0707
            },
            {
                "date": "2025-01-31",
                "amount_busd": 6379.9,
                "amount_musd": 6379924.9602
            },
            {
                "date": "2025-02-28",
                "amount_busd": 6368,
                "amount_musd": 6367951.7093
            },
            {
                "date": "2025-03-31",
   
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/marketable` — Tradable securities (Bills/Notes/Bonds/TIPS/FRN)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtcomposition-api/v1/marketable"
```

**Response:**
```json
{
    "data": {
        "date": "2026-05-31",
        "count": 6,
        "source": "US Treasury (MSPD)",
        "securities": [
            {
                "amount_busd": 15942.7,
                "amount_musd": 15942721.4171,
                "security_class": "Notes",
                "share_of_marketable_pct": 51.57
            },
            {
                "amount_busd": 6758.8,
                "amount_musd": 6758778.5857,
                "security_class": "Bills",
                "share_of_marketable_pct": 21.86
            },
            {
                "amount_busd": 5412.1,
                "amount_musd": 5412096.5247,
                "security_class": "Bonds",
                "share_of_marketable_pct": 17.51
            },
            {
                "amount_busd": 2118,
                "amount_musd": 2118028.27552178,
                "security_class": "TIPS",
                "share_of_marketable_pct": 6.85
            },
            {
                "amount_busd": 678.3,
                "amount_musd": 678316.5054,
                "security_class": "Floating Rate Notes",
                "share_of_marketable_pct": 2.19
            },
            {
                "amount_busd": 4.1,
                "amount_musd": 4092.6753,
                "security_class": "Federal Financing Bank",
                "share_of_marketable_pct": 0.01
            }
        ],
        "total_marketable_busd": 30914
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:19.787Z"
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtcomposition-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Amounts are millions (musd) and billions (busd) of US dollars. Marketable debt is the tradable securities (Bills, Notes, Bonds, TIPS, FRN); non-marketable is held by trust funds (Government Account Series), savers and governments. history class is total, marketable, nonmarketable, bills, notes, bonds, tips, frn, savings or gas.",
        "source": "US Treasury Monthly Statement of the Public Debt (api.fiscaldata.treasury.gov/debt/mspd, monthly)",
        "service": "debtcomposition-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/history": "One security class's outstanding amount month by month (class=bills, months=24).",
            "GET /v1/marketable": "Tradable securities (Bills/Notes/Bonds/TIPS/FRN) with marketable share.",
            "GET /v1/composition": "Latest full debt breakdown by security class with shares."
        },
        "description": "What the US national debt is made of, from the Treasury's Monthly Statement of the Public Debt. composition returns the latest full breakdown by security class (Bills, Notes, Bonds, TIPS, FRN, Government Account Series, Savings Bonds …) with each one's share; marketable isolates the tradable securities (Bills/Notes/Bonds/TIPS/FRN) with their share of marketable debt; history returns one security class's outstanding amount month by month. Live, no key, nothing stored. The debt-structure data-cut, distinct from the debt-to-the-penny total, fisca
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/debtcomposition-api
OpenAPI spec: https://www.oanor.com/api/debtcomposition-api/openapi.json
