# U.S. Treasury Fiscal Data

> Pull official U.S. federal finance figures from the Treasury's Fiscal Data: the national debt to the penny and by kind of security, the debt limit, monthly receipts, spending and deficits, the Treasury's daily cash, tax refunds and revenue collections, average interest rates, official exchange rates, I bond rates and savings bond values, Treasury auction results and records, the gold reserve, gifts to reduce the debt, and any other Fiscal Data dataset. No account or API key is required.

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/treasury-fiscal-data

## Actions

### Get average interest rates on Treasury securities

Get the average interest rate the government pays on its debt, by type of security (bills, notes, bonds, TIPS, savings bonds and more), for the latest month or a range of months back to 2001.

**Inputs**

- From date (`from_date`, date): The first month to include. Leave empty for just the latest month (or the month of the to date).
- To date (`to_date`, date): The last month to include. Leave empty for the latest.
- Securities (`securities`, list): Only these securities. Leave empty for all of them. One or more of: `Total Interest-bearing Debt` (All interest-bearing debt), `Total Marketable` (All marketable securities), `Treasury Bills`, `Treasury Notes`, `Treasury Bonds`, `Treasury Inflation-Protected Securities (TIPS)`, `Treasury Floating Rate Notes (FRN)`, `Federal Financing Bank`, `Total Non-marketable` (All non-marketable securities), `United States Savings Securities` (U.S. savings bonds), and 7 more.

**Outputs**

- `latest_record_date` (text)
- `months` (list)
- `rate_count` (number)
- `rates` (list)
- `source_url` (text)
- `total_interest_bearing_debt_rate` (number)
- `total_marketable_rate` (number)
- `total_non_marketable_rate` (number)

**Example output**

```json
{
  "latest_record_date": "2026-09-30",
  "months": [
    "2026-09-30"
  ],
  "rate_count": 2,
  "rates": [
    {
      "average_interest_rate": 3.87,
      "record_date": "2026-09-30",
      "security": "Treasury Bills",
      "security_type": "Marketable"
    },
    {
      "average_interest_rate": 3.531,
      "record_date": "2026-09-30",
      "security": "Total Interest-bearing Debt",
      "security_type": "Interest-bearing Debt"
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/average-interest-rates-treasury-securities/",
  "total_interest_bearing_debt_rate": 3.531,
  "total_marketable_rate": 3.518,
  "total_non_marketable_rate": 3.592
}
```

### Get daily deposits and withdrawals

Get what went into and out of the Treasury's account on a day, by category (withheld taxes, Social Security benefits, Medicare, defense…), largest first, with today's, month-to-date and fiscal-year-to-date amounts and totals.

**Inputs**

- Date (`as_of_date`, date): The day to report. A weekend or holiday gives the business day before. Leave empty for the latest.
- Show (`transaction_type`, text): Which side of the account to list. One of: `both` (Deposits and withdrawals), `deposits` (Deposits only), `withdrawals` (Withdrawals only). Default: `both`.
- Category contains (`category`, text): Only categories whose name contains this text, for example Social Security or Taxes. Leave empty for all.

**Outputs**

- `deposit_count` (number)
- `deposits` (list)
- `record_date` (text)
- `source_url` (text)
- `total_deposits_fiscal_year_to_date` (number)
- `total_deposits_month_to_date` (number)
- `total_deposits_today` (number)
- `total_withdrawals_fiscal_year_to_date` (number)
- `total_withdrawals_month_to_date` (number)
- `total_withdrawals_today` (number)
- `withdrawal_count` (number)
- `withdrawals` (list)

**Example output**

```json
{
  "deposit_count": 1,
  "deposits": [
    {
      "category": "Taxes - Withheld Individual/FICA",
      "fiscal_year_to_date": 118389000000,
      "month_to_date": 118389000000,
      "today": 26965000000
    }
  ],
  "record_date": "2026-10-13",
  "source_url": "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/",
  "total_deposits_fiscal_year_to_date": 1413609000000,
  "total_deposits_month_to_date": 1413609000000,
  "total_deposits_today": 353928000000,
  "total_withdrawals_fiscal_year_to_date": 1477440000000,
  "total_withdrawals_month_to_date": 1477440000000,
  "total_withdrawals_today": 306239000000,
  "withdrawal_count": 1,
  "withdrawals": [
    {
      "category": "SSA - Benefits Payments",
      "fiscal_year_to_date": 29809000000,
      "month_to_date": 29809000000,
      "today": 184000000
    }
  ]
}
```

### Get debt by security type

Get how the public debt splits across kinds of security at a month's end: bills, notes, bonds, TIPS, floating rate notes and the non-marketable series such as savings bonds, each with how much the public holds and how much government accounts hold. Monthly back to January 2001.

**Inputs**

- Month (`month`, date): Any day in the month to report. Leave empty for the latest month published (figures come out a few days after a month ends).

**Outputs**

- `debt_held_by_public` (number)
- `intragovernmental_holdings` (number)
- `month` (text)
- `record_date` (text)
- `securities` (list)
- `security_count` (number)
- `source_url` (text)
- `total_debt` (number)
- `total_marketable` (number)
- `total_non_marketable` (number)

**Example output**

```json
{
  "debt_held_by_public": 32425012516890.3,
  "intragovernmental_holdings": 7746812589737.23,
  "month": "2026-09",
  "record_date": "2026-09-30",
  "securities": [
    {
      "debt_held_by_public": 7117937067100,
      "intragovernmental_holdings": 208247000,
      "security": "Bills",
      "security_type": "Marketable",
      "total": 7118145314100
    },
    {
      "debt_held_by_public": 367961663251.09,
      "intragovernmental_holdings": 7726330903336.82,
      "security": "Government Account Series",
      "security_type": "Nonmarketable",
      "total": 8094292566587.91
    }
  ],
  "security_count": 2,
  "source_url": "https://fiscaldata.treasury.gov/datasets/monthly-statement-public-debt/",
  "total_debt": 40171825106627.5,
  "total_marketable": 31834878443402.3,
  "total_non_marketable": 8336946663225.16
}
```

### Get debt limit status

See how close the debt is to the statutory debt limit (the debt ceiling) on a day: the debt subject to the limit, the limit, the room left, and whether the limit is suspended.

**Inputs**

- Date (`as_of_date`, date): The day to report, from the Daily Treasury Statement. Leave empty for the latest.

**Outputs**

- `debt_held_by_public` (number)
- `debt_not_subject_to_limit` (number)
- `debt_subject_to_limit` (number)
- `intragovernmental_holdings` (number)
- `limit_suspended` (true/false)
- `percent_of_limit_used` (number)
- `record_date` (text)
- `room_under_limit` (number)
- `source_url` (text)
- `statutory_debt_limit` (number)
- `total_public_debt_outstanding` (number)

**Example output**

```json
{
  "debt_held_by_public": 32483641000000,
  "debt_not_subject_to_limit": 198411000000,
  "debt_subject_to_limit": 40145468000000,
  "intragovernmental_holdings": 7860238000000,
  "limit_suspended": false,
  "percent_of_limit_used": 97.67,
  "record_date": "2026-10-13",
  "room_under_limit": 958528000000,
  "source_url": "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/",
  "statutory_debt_limit": 41103996000000,
  "total_public_debt_outstanding": 40343879000000
}
```

### Get exchange rate

Get the Treasury's official exchange rate for a currency, the rate federal agencies must use for reporting, and optionally convert an amount to or from U.S. dollars. Rates are set each quarter.

**Inputs**

- Currency (`currency`, text, required): The country and currency, as Treasury names them, for example Canada-Dollar or Euro Zone-Euro.
- Date (`as_of_date`, date): Use the rate in force on this day. Leave empty for the latest rate.
- Amount to convert (`amount`, number): An amount to convert. Leave empty to only get the rate.
- Convert (`convert`, text): Which way to convert the amount. One of: `to_usd` (From this currency into U.S. dollars), `from_usd` (From U.S. dollars into this currency). Default: `to_usd`.

**Outputs**

- `amount` (number)
- `amount_currency` (text)
- `converted_amount` (number)
- `converted_currency` (text)
- `country` (text)
- `country_currency` (text)
- `currency` (text)
- `effective_date` (text)
- `exchange_rate` (number)
- `record_date` (text)
- `source_url` (text)
- `usd_per_unit` (number)

**Example output**

```json
{
  "amount": 100,
  "amount_currency": "Canada-Dollar",
  "converted_amount": 70.52,
  "converted_currency": "USD",
  "country": "Canada",
  "country_currency": "Canada-Dollar",
  "currency": "Dollar",
  "effective_date": "2026-09-30",
  "exchange_rate": 1.418,
  "record_date": "2026-09-30",
  "source_url": "https://fiscaldata.treasury.gov/datasets/treasury-reporting-rates-exchange/",
  "usd_per_unit": 0.705219
}
```

### Get historical debt by year

Get the national debt at the end of each fiscal year, as far back as 1790, newest first, with each year's change in dollars and percent.

**Inputs**

- From year (`from_year`, number): The first fiscal year to include. Leave empty for 1790. From 1790 to 2100.
- To year (`to_year`, number): The last fiscal year to include. Leave empty for the latest. From 1790 to 2100.

**Outputs**

- `latest_fiscal_year` (number)
- `latest_total_debt` (number)
- `source_url` (text)
- `year_count` (number)
- `years` (list)

**Example output**

```json
{
  "latest_fiscal_year": 2023,
  "latest_total_debt": 33167334044723.16,
  "source_url": "https://fiscaldata.treasury.gov/datasets/historical-debt-outstanding/",
  "year_count": 1,
  "years": [
    {
      "change_from_previous_year": 2238422431416.43,
      "fiscal_year": 2023,
      "percent_change_from_previous_year": 7.24,
      "record_date": "2023-09-30",
      "total_debt": 33167334044723.16
    }
  ]
}
```

### Get I bond interest rates

Get the interest an I savings bond earns: its fixed rate, the current inflation rate and the combined rate, for bonds bought this month or in any month since September 1998, with every rate that bond has earned.

**Inputs**

- Bought in (`issue_month`, date): Any day in the month the bond was bought. Leave empty for a bond bought this month.

**Outputs**

- `combined_rate` (number)
- `earning_period_end` (text)
- `earning_period_start` (text)
- `fixed_rate` (number)
- `issue_month` (text)
- `rate_history` (list)
- `requested_month` (text)
- `semi_annual_inflation_rate` (number)
- `source_url` (text)

**Example output**

```json
{
  "combined_rate": 3.54,
  "earning_period_end": "2026-10-31",
  "earning_period_start": "2026-05-01",
  "fixed_rate": 0.2,
  "issue_month": "2020-03",
  "rate_history": [
    {
      "combined_rate": 3.54,
      "earning_period_end": "2026-10-31",
      "earning_period_start": "2026-05-01",
      "fixed_rate": 0.2,
      "semi_annual_inflation_rate": 1.67
    }
  ],
  "requested_month": "2020-03",
  "semi_annual_inflation_rate": 1.67,
  "source_url": "https://fiscaldata.treasury.gov/datasets/i-bonds-interest-rates/"
}
```

### Get interest expense on the debt

Get what the government spent on interest on the public debt in a month and so far in the fiscal year, in total and by type of security.

**Inputs**

- Month (`month`, date): Any day in the month to report. Leave empty for the latest month published.

**Outputs**

- `expenses` (list)
- `fiscal_year` (number)
- `government_account_series_fiscal_year_to_date_expense` (number)
- `government_account_series_month_expense` (number)
- `month` (text)
- `public_issues_fiscal_year_to_date_expense` (number)
- `public_issues_month_expense` (number)
- `record_date` (text)
- `source_url` (text)
- `total_fiscal_year_to_date_expense` (number)
- `total_month_expense` (number)

**Example output**

```json
{
  "expenses": [
    {
      "category": "Public issues",
      "fiscal_year_to_date_expense": 498310354191.06,
      "group": "Accrued interest expense",
      "month_expense": 43512954841.94,
      "type": "Treasury Notes"
    }
  ],
  "fiscal_year": 2026,
  "government_account_series_fiscal_year_to_date_expense": 291932598704.43,
  "government_account_series_month_expense": 5936280998.26,
  "month": "2026-09",
  "public_issues_fiscal_year_to_date_expense": 1068464267661.58,
  "public_issues_month_expense": 86655440786.49,
  "record_date": "2026-09-30",
  "source_url": "https://fiscaldata.treasury.gov/datasets/interest-expense-debt-outstanding/",
  "total_fiscal_year_to_date_expense": 1360396866366.01,
  "total_month_expense": 92591721784.75
}
```

### Get monthly deficits over time

List the government's receipts, outlays and deficit (or surplus) month by month, newest first, back to October 1980, with how each deficit was financed and the totals across the months.

**Inputs**

- From date (`from_date`, date): The first month to include. Leave empty to count back from the end.
- To date (`to_date`, date): The last month to include. Leave empty for the latest.
- Number of months (`limit`, number): The most months to return, newest first. Defaults to 12. From 1 to 600. Default: `12`.

**Outputs**

- `month_count` (number)
- `months` (list)
- `source_url` (text)
- `total_deficit` (number)
- `total_outlays` (number)
- `total_receipts` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "month_count": 1,
  "months": [
    {
      "borrowing_from_the_public": 369378000000,
      "deficit": 166797000000,
      "fiscal_year": 2026,
      "month": "2026-08",
      "other_financing": -55593000000,
      "outlays": 526830000000,
      "receipts": 360033000000,
      "record_date": "2026-08-31",
      "reduction_of_operating_cash": -146988000000
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/monthly-treasury-statement/",
  "total_deficit": 166797000000,
  "total_outlays": 526830000000,
  "total_receipts": 360033000000,
  "truncated": true
}
```

### Get monthly receipts and spending

Get the Monthly Treasury Statement for a month: what the government took in by source (income tax, customs duties…) and spent by function (Social Security, defense, interest…), the month's deficit or surplus, and the fiscal-year-to-date totals against last year's.

**Inputs**

- Month (`month`, date): Any day in the month to report. Leave empty for the latest month published (statements come out about two weeks after a month ends).

**Outputs**

- `deficit` (number)
- `fiscal_year` (number)
- `fiscal_year_to_date_deficit` (number)
- `fiscal_year_to_date_outlays` (number)
- `fiscal_year_to_date_receipts` (number)
- `is_surplus` (true/false)
- `month` (text)
- `outlays_by_function` (list)
- `prior_fiscal_year_to_date_deficit` (number)
- `prior_fiscal_year_to_date_outlays` (number)
- `prior_fiscal_year_to_date_receipts` (number)
- `receipts_by_source` (list)
- `record_date` (text)
- `source_url` (text)
- `total_outlays` (number)
- `total_receipts` (number)

**Example output**

```json
{
  "deficit": 166796952277.38,
  "fiscal_year": 2026,
  "fiscal_year_to_date_deficit": 1965591017473.53,
  "fiscal_year_to_date_outlays": 6811043257196.1,
  "fiscal_year_to_date_receipts": 4845452239722.57,
  "is_surplus": false,
  "month": "2026-08",
  "outlays_by_function": [
    {
      "amount": 141430845209.63,
      "category": "Social Security",
      "fiscal_year_to_date": 1525869028278.8,
      "prior_fiscal_year_to_date": 1447322603343.22
    }
  ],
  "prior_fiscal_year_to_date_deficit": 1973306911096.03,
  "prior_fiscal_year_to_date_outlays": 6664260309950.24,
  "prior_fiscal_year_to_date_receipts": 4690953398854.21,
  "receipts_by_source": [
    {
      "amount": 179040465653.06,
      "category": "Individual Income Taxes",
      "fiscal_year_to_date": 2547997569751.14,
      "prior_fiscal_year_to_date": 2357631304884.08
    }
  ],
  "record_date": "2026-08-31",
  "source_url": "https://fiscaldata.treasury.gov/datasets/monthly-treasury-statement/",
  "total_outlays": 526829688118.8,
  "total_receipts": 360032735841.42
}
```

### Get national debt history

List the national debt over time, newest first: every business day, or the last figure of each month or year. Includes the change across the period. Daily figures go back to April 1993.

**Inputs**

- From date (`from_date`, date): The first day to include. Leave empty to count back from the end.
- To date (`to_date`, date): The last day to include. Leave empty for today.
- Frequency (`frequency`, text): How often to report the debt. One of: `daily` (Every business day), `monthly` (Last business day of each month), `yearly` (Last business day of each year). Default: `daily`.
- Number of figures (`limit`, number): The most figures to return, newest first. Defaults to 30. From 1 to 1000. Default: `30`.

**Outputs**

- `change` (number)
- `earliest_total_debt` (number)
- `entries` (list)
- `entry_count` (number)
- `frequency` (text)
- `latest_total_debt` (number)
- `percent_change` (number)
- `source_url` (text)
- `truncated` (true/false)

**Example output**

```json
{
  "change": 172054136695.36,
  "earliest_total_debt": 40171825101340.31,
  "entries": [
    {
      "debt_held_by_public": 32483641012611.98,
      "intragovernmental_holdings": 7860238225423.69,
      "record_date": "2026-10-13",
      "total_debt": 40343879238035.67
    },
    {
      "debt_held_by_public": 32425012546390.57,
      "intragovernmental_holdings": 7746812554949.74,
      "record_date": "2026-09-30",
      "total_debt": 40171825101340.31
    }
  ],
  "entry_count": 2,
  "frequency": "monthly",
  "latest_total_debt": 40343879238035.67,
  "percent_change": 0.43,
  "source_url": "https://fiscaldata.treasury.gov/datasets/debt-to-the-penny/",
  "truncated": true
}
```

### Get record-setting auctions

Get the records set at Treasury auctions for each security and term: the lowest and highest rates ever paid, the largest amount offered and the highest bid-to-cover ratio, each with the date it was first set.

**Inputs**

- Security type (`security_type`, text): The kind of Treasury security. One of: `any` (Any security), `bill` (Bills), `cmb` (Cash management bills), `note` (Notes), `bond` (Bonds), `tips` (TIPS (inflation-protected)), `frn` (Floating rate notes (FRN)). Default: `any`.

**Outputs**

- `record_count` (number)
- `record_date` (text)
- `records` (list)
- `source_url` (text)

**Example output**

```json
{
  "record_count": 1,
  "record_date": "2026-10-19",
  "records": [
    {
      "highest_bid_to_cover_first_set_on": "2010-04-07",
      "highest_bid_to_cover_ratio": 3.72,
      "highest_rate": 6.54,
      "highest_rate_first_set_on": "2000-02-09",
      "largest_offering_amount": 42000000000,
      "largest_offering_first_set_on": "2024-02-07",
      "lowest_rate": 0.653,
      "lowest_rate_first_set_on": "2020-07-08",
      "security_term": "10-Year",
      "security_type": "Notes",
      "single_price_auctions_since": "1998-11-04"
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/record-setting-auction-data/"
}
```

### Get savings bond value

Find what a U.S. savings bond (Series I, EE, E or a Savings Note) can be cashed in for this month, or any month Treasury has published, from its series, issue date and face value.

**Inputs**

- Series (`series`, text, required): The series printed on the bond. One of: `I` (Series I), `EE` (Series EE), `E` (Series E), `SN` (Savings Notes). Default: `I`.
- Issue date (`issue_date`, date, required): The issue date on the bond. Only its month and year matter.
- Face value (`face_value`, number, required): The bond's face value (denomination) in dollars, for example 100. For an electronic bond, the amount it was bought for.
- Value as of (`as_of_date`, date): The month to value the bond in. Leave empty for this month.

**Outputs**

- `can_be_cashed` (true/false)
- `face_value` (number)
- `issue_month` (text)
- `series` (text)
- `series_name` (text)
- `source_url` (text)
- `value` (number)
- `value_month` (text)
- `value_per_25_dollars` (number)

**Example output**

```json
{
  "can_be_cashed": true,
  "face_value": 100,
  "issue_month": "2022-01",
  "series": "I",
  "series_name": "Series I",
  "source_url": "https://fiscaldata.treasury.gov/datasets/savings-bond-value-files/",
  "value": 122.64,
  "value_month": "2026-10",
  "value_per_25_dollars": 30.66
}
```

### Get the national debt

Get the total U.S. national debt to the penny on a day (the latest by default), split into debt held by the public and intragovernmental holdings, with the change from the business day before.

**Inputs**

- Date (`as_of_date`, date): The day to report. Treasury publishes the debt each business day, so a weekend or holiday gives the business day before. Leave empty for the latest.

**Outputs**

- `change_since_previous` (number)
- `debt_held_by_public` (number)
- `fiscal_year` (number)
- `intragovernmental_holdings` (number)
- `previous_record_date` (text)
- `previous_total_debt` (number)
- `record_date` (text)
- `source_url` (text)
- `total_debt` (number)

**Example output**

```json
{
  "change_since_previous": 42398706136.02,
  "debt_held_by_public": 32483641012611.98,
  "fiscal_year": 2027,
  "intragovernmental_holdings": 7860238225423.69,
  "previous_record_date": "2026-10-09",
  "previous_total_debt": 40301480531899.65,
  "record_date": "2026-10-13",
  "source_url": "https://fiscaldata.treasury.gov/datasets/debt-to-the-penny/",
  "total_debt": 40343879238035.67
}
```

### Get Treasury cash balance

Get the Treasury's operating cash balance (the Treasury General Account) on a day from the Daily Treasury Statement: opening and closing balance, and the day's, month's and fiscal year's deposits and withdrawals.

**Inputs**

- Date (`as_of_date`, date): The day to report. A weekend or holiday gives the business day before. Leave empty for the latest.

**Outputs**

- `change_today` (number)
- `closing_balance` (number)
- `deposits_today` (number)
- `fiscal_year_opening_balance` (number)
- `fiscal_year_to_date_deposits` (number)
- `fiscal_year_to_date_withdrawals` (number)
- `month_opening_balance` (number)
- `month_to_date_deposits` (number)
- `month_to_date_withdrawals` (number)
- `opening_balance` (number)
- `record_date` (text)
- `source_url` (text)
- `withdrawals_today` (number)

**Example output**

```json
{
  "change_today": 47688000000,
  "closing_balance": 920214000000,
  "deposits_today": 353928000000,
  "fiscal_year_opening_balance": 984046000000,
  "fiscal_year_to_date_deposits": 1413609000000,
  "fiscal_year_to_date_withdrawals": 1477440000000,
  "month_opening_balance": 984046000000,
  "month_to_date_deposits": 1413609000000,
  "month_to_date_withdrawals": 1477440000000,
  "opening_balance": 872526000000,
  "record_date": "2026-10-13",
  "source_url": "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/",
  "withdrawals_today": 306239000000
}
```

### Get Treasury gold reserve

Get how much gold the U.S. Treasury owns, in fine troy ounces and at its statutory book value, and where it is held (Fort Knox, West Point, Denver, the New York Fed…).

**Inputs**

- Date (`as_of_date`, date): Report the holdings as of this month's end. Leave empty for the latest.

**Outputs**

- `book_value_per_ounce` (number)
- `holdings` (list)
- `record_date` (text)
- `source_url` (text)
- `total_book_value` (number)
- `total_fine_troy_ounces` (number)

**Example output**

```json
{
  "book_value_per_ounce": 42.2222,
  "holdings": [
    {
      "book_value": 6221097412.78,
      "facility": "Mint Held Gold - Deep Storage",
      "fine_troy_ounces": 147341858.382,
      "form": "Gold Bullion",
      "location": "Fort Knox, KY"
    }
  ],
  "record_date": "2026-08-31",
  "source_url": "https://fiscaldata.treasury.gov/datasets/status-report-government-gold-reserve/",
  "total_book_value": 11041059957.9,
  "total_fine_troy_ounces": 261498926.241
}
```

### List daily revenue collections

List the money the federal government collected each day, newest first: IRS taxes, other IRS collections, and other agencies' fees, fines and loan repayments, and how it was paid (bank, internet, mail or over the counter). Back to October 2004.

**Inputs**

- From date (`from_date`, date): The first day to include. Leave empty to count back from the end.
- To date (`to_date`, date): The last day to include. Leave empty for the latest.
- Revenue type (`revenue_type`, text): Only this kind of revenue. Leave empty for all of it. One of: `IRS Tax` (IRS taxes), `IRS Non-Tax` (Other IRS collections), `Non-Tax` (Other agencies' fees, fines and repayments).
- Paid by (`channel`, text): Only money paid this way. Leave empty for every way. One of: `Bank`, `Internet`, `Mail`, `Over-the-Counter (OTC)` (Over the counter).
- Number of days (`limit`, number): The most days to return, newest first. Defaults to 10. From 1 to 366. Default: `10`.

**Outputs**

- `channel` (text)
- `day_count` (number)
- `days` (list)
- `revenue_type` (text)
- `source_url` (text)
- `total_collections` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "channel": null,
  "day_count": 2,
  "days": [
    {
      "bank": 4411587939.73,
      "internet": 38684539194.87,
      "irs_non_tax": 257777.81,
      "irs_tax": 38281053054.04,
      "mail": 370557523.5,
      "non_tax": 5559182711.11,
      "over_the_counter": 373808884.86,
      "record_date": "2026-10-15",
      "total_collections": 43840493542.96
    },
    {
      "bank": 3204327382.8,
      "internet": 12270197154.07,
      "irs_non_tax": 1080169.67,
      "irs_tax": 12181671582.74,
      "mail": 1193046678.33,
      "non_tax": 4800422687.34,
      "over_the_counter": 315603224.55,
      "record_date": "2026-10-14",
      "total_collections": 16983174439.75
    }
  ],
  "revenue_type": null,
  "source_url": "https://fiscaldata.treasury.gov/datasets/revenue-collections-management/",
  "total_collections": 60823667982.71,
  "truncated": true
}
```

### List daily tax refunds

List the income tax refunds the Treasury paid each business day, newest first, to individuals and to businesses, with the month-to-date and fiscal-year-to-date totals. From the Daily Treasury Statement, back to October 2005.

**Inputs**

- From date (`from_date`, date): The first day to include. Leave empty to count back from the end.
- To date (`to_date`, date): The last day to include. Leave empty for the latest.
- Number of days (`limit`, number): The most business days to return, newest first. Defaults to 10. From 1 to 366. Default: `10`.

**Outputs**

- `day_count` (number)
- `days` (list)
- `source_url` (text)
- `total_refunds` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "day_count": 2,
  "days": [
    {
      "business_refunds": 2000000,
      "business_refunds_fiscal_year_to_date": 4265000000,
      "business_refunds_month_to_date": 4265000000,
      "individual_refunds": 186000000,
      "individual_refunds_fiscal_year_to_date": 5460000000,
      "individual_refunds_month_to_date": 5460000000,
      "other_payments": null,
      "record_date": "2026-10-16",
      "total_refunds": 188000000,
      "total_refunds_fiscal_year_to_date": 9725000000,
      "total_refunds_month_to_date": 9725000000
    },
    {
      "business_refunds": 19000000,
      "business_refunds_fiscal_year_to_date": 4263000000,
      "business_refunds_month_to_date": 4263000000,
      "individual_refunds": 1806000000,
      "individual_refunds_fiscal_year_to_date": 5275000000,
      "individual_refunds_month_to_date": 5275000000,
      "other_payments": null,
      "record_date": "2026-10-15",
      "total_refunds": 1825000000,
      "total_refunds_fiscal_year_to_date": 9538000000,
      "total_refunds_month_to_date": 9538000000
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/",
  "total_refunds": 2013000000,
  "truncated": true
}
```

### List exchange rates

List the Treasury's official exchange rates: every currency for the latest quarter, or chosen currencies over a range of dates back to 2001. Each rate is units of the currency per U.S. dollar.

**Inputs**

- Currencies (`currencies`, list): Only these currencies. Leave empty for all of them.
- From date (`from_date`, date): The first date to include. Leave empty for just the latest quarter (or the quarter of the to date).
- To date (`to_date`, date): The last date to include. Leave empty for the latest.

**Outputs**

- `latest_record_date` (text)
- `rate_count` (number)
- `rates` (list)
- `source_url` (text)

**Example output**

```json
{
  "latest_record_date": "2026-09-30",
  "rate_count": 2,
  "rates": [
    {
      "country": "Japan",
      "country_currency": "Japan-Yen",
      "currency": "Yen",
      "effective_date": "2026-09-30",
      "exchange_rate": 157.09,
      "record_date": "2026-09-30"
    },
    {
      "country": "Mexico",
      "country_currency": "Mexico-Peso",
      "currency": "Peso",
      "effective_date": "2026-09-30",
      "exchange_rate": 18.134,
      "record_date": "2026-09-30"
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/treasury-reporting-rates-exchange/"
}
```

### List gifts to reduce the debt

List what people gave the Treasury to reduce the public debt each month, newest first, back to September 1996, with the total across the months.

**Inputs**

- From date (`from_date`, date): The first month to include. Leave empty to count back from the end.
- To date (`to_date`, date): The last month to include. Leave empty for the latest.
- Number of months (`limit`, number): The most months to return, newest first. Defaults to 12. From 1 to 600. Default: `12`.

**Outputs**

- `month_count` (number)
- `months` (list)
- `source_url` (text)
- `total_amount` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "month_count": 2,
  "months": [
    {
      "amount": 48117.67,
      "fiscal_year": 2026,
      "month": "2026-08",
      "record_date": "2026-08-31"
    },
    {
      "amount": 23143.83,
      "fiscal_year": 2026,
      "month": "2026-07",
      "record_date": "2026-07-31"
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/gift-contributions-reduce-debt-held-by-public/",
  "total_amount": 71261.5,
  "truncated": true
}
```

### List Treasury auction results

List the results of Treasury bill, note and bond auctions, newest first: the high yield or rate, price, amounts offered, bid and accepted, the bid-to-cover ratio, who bought, and links to the official announcement and results.

**Inputs**

- Security type (`security_type`, text): The kind of Treasury security. One of: `any` (Any security), `bill` (Bills), `cmb` (Cash management bills), `note` (Notes), `bond` (Bonds), `tips` (TIPS (inflation-protected)), `frn` (Floating rate notes (FRN)). Default: `any`.
- Term (`term`, text): Only securities of this term, such as 10 year. A reopened note or bond counts under the term it was first sold at. Leave empty for every term. One of: `4-Week` (4 week), `6-Week` (6 week), `8-Week` (8 week), `13-Week` (13 week), `17-Week` (17 week), `26-Week` (26 week), `52-Week` (52 week), `2-Year` (2 year), `3-Year` (3 year), `5-Year` (5 year), and 4 more.
- From date (`from_date`, date): Only auctions held on or after this day.
- To date (`to_date`, date): Only auctions held on or before this day. Leave empty for today.
- Number of auctions (`limit`, number): The most auctions to return, newest first. Defaults to 20. From 1 to 500. Default: `20`.

**Outputs**

- `auction_count` (number)
- `auctions` (list)
- `source_url` (text)

**Example output**

```json
{
  "auction_count": 1,
  "auctions": [
    {
      "announcement_date": "2026-10-01",
      "announcement_url": "https://www.treasurydirect.gov/instit/annceresult/press/preanre/2026/A_20261001_3.pdf",
      "auction_date": "2026-10-07",
      "bid_to_cover_ratio": 2.77,
      "cash_management_bill": false,
      "cusip": "91282CRF0",
      "direct_bidder_accepted": 6618200000,
      "floating_rate": false,
      "high_discount_margin": null,
      "high_discount_rate": null,
      "high_investment_rate": null,
      "high_yield": 5.3,
      "indirect_bidder_accepted": 31063238000,
      "interest_rate": 4.625,
      "issue_date": "2026-10-15",
      "maturity_date": "2036-08-15",
      "offering_amount": 39000000000,
      "original_security_term": "10-Year",
      "price_per_100": 94.864261,
      "primary_dealer_accepted": 984000000,
      "reopening": true,
      "results_url": "https://www.treasurydirect.gov/instit/annceresult/press/preanre/2026/R_20261007_2.pdf",
      "security_term": "9-Year 10-Month",
      "security_type": "Note",
      "tips": false,
      "total_accepted": 39926321900,
      "total_tendered": 108995289900
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/treasury-securities-auctions-data/"
}
```

### List upcoming Treasury auctions

List the Treasury auctions that have been announced but not yet held, soonest first: the security, the auction and issue dates, the amount offered, and the announcement.

**Inputs**

- Security type (`security_type`, text): The kind of Treasury security. One of: `any` (Any security), `bill` (Bills), `cmb` (Cash management bills), `note` (Notes), `bond` (Bonds), `tips` (TIPS (inflation-protected)), `frn` (Floating rate notes (FRN)). Default: `any`.
- Term (`term`, text): Only securities of this term, such as 10 year. A reopened note or bond counts under the term it was first sold at. Leave empty for every term. One of: `4-Week` (4 week), `6-Week` (6 week), `8-Week` (8 week), `13-Week` (13 week), `17-Week` (17 week), `26-Week` (26 week), `52-Week` (52 week), `2-Year` (2 year), `3-Year` (3 year), `5-Year` (5 year), and 4 more.

**Outputs**

- `auction_count` (number)
- `auctions` (list)
- `source_url` (text)

**Example output**

```json
{
  "auction_count": 1,
  "auctions": [
    {
      "announcement_date": "2026-10-15",
      "announcement_url": "https://www.treasurydirect.gov/instit/annceresult/press/preanre/2026/A_20261015_1.pdf",
      "auction_date": "2026-10-22",
      "bid_to_cover_ratio": null,
      "cash_management_bill": false,
      "cusip": "91282CRR4",
      "direct_bidder_accepted": null,
      "floating_rate": false,
      "high_discount_margin": null,
      "high_discount_rate": null,
      "high_investment_rate": null,
      "high_yield": null,
      "indirect_bidder_accepted": null,
      "interest_rate": null,
      "issue_date": "2026-10-30",
      "maturity_date": "2031-10-31",
      "offering_amount": 26000000000,
      "original_security_term": "5-Year",
      "price_per_100": null,
      "primary_dealer_accepted": null,
      "reopening": false,
      "results_url": null,
      "security_term": "5-Year",
      "security_type": "Note",
      "tips": false,
      "total_accepted": null,
      "total_tendered": null
    }
  ],
  "source_url": "https://fiscaldata.treasury.gov/datasets/treasury-securities-auctions-data/"
}
```

### Query a dataset

Get rows from any of Fiscal Data's datasets (tax collections, the public debt statement, savings bond sales, trust funds and more): pick the dataset, then narrow it to dates and filter one column. Numbers come back as numbers, with a link to download the same rows as a CSV.

**Inputs**

- Dataset (`dataset`, text, required): The dataset to read.
- From date (`from_date`, date): Only rows dated on or after this day. Leave empty for any.
- To date (`to_date`, date): Only rows dated on or before this day. Leave empty for any.
- Filter column (`filter_field`, text): A column to filter on. Leave empty for every row.
- Comparison (`filter_operator`, text): How the column is compared with the value. One of: `eq` (is), `in` (is one of (separate with commas)), `gt` (is greater than), `gte` (is at least), `lt` (is less than), `lte` (is at most). Default: `eq`.
- Filter value (`filter_value`, text): The value to compare with, written exactly as the dataset writes it (capitals count). For 'is one of', separate values with commas.
- Newest first (`newest_first`, true/false): Sort the rows newest first. Untick for oldest first. Default: `true`.
- Number of rows (`limit`, number): The most rows to return. Defaults to 100. From 1 to 1000. Default: `100`.

**Outputs**

- `columns` (list)
- `csv_url` (text)
- `dataset` (text)
- `date_column` (text)
- `row_count` (number)
- `rows` (list)
- `total_count` (number)
- `truncated` (true/false)

**Example output**

```json
{
  "columns": [
    {
      "label": "Record Date",
      "name": "record_date",
      "type": "DATE"
    },
    {
      "label": "Location Description",
      "name": "location_desc",
      "type": "STRING"
    },
    {
      "label": "Fine Troy Ounces",
      "name": "fine_troy_ounce_qty",
      "type": "NUMBER"
    }
  ],
  "csv_url": "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/gold_reserve?page%5Bsize%5D=1&sort=-record_date&format=csv",
  "dataset": "v2/accounting/od/gold_reserve",
  "date_column": "record_date",
  "row_count": 1,
  "rows": [
    {
      "fine_troy_ounce_qty": 147341858.382,
      "location_desc": "Fort Knox, KY",
      "record_date": "2026-08-31"
    }
  ],
  "total_count": 1408,
  "truncated": true
}
```
