# US Treasury Yield Curve, Debt & Auctions Data Feed (`datacrate/us-treasury-data-feed`) Actor

Daily US Treasury yield curve with 2s10s spread and day change, national debt to the penny, securities auctions, average interest rates and Treasury exchange rates. Official free Treasury data, delta mode for alerts.

- **URL**: https://apify.com/datacrate/us-treasury-data-feed.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.64 / 1,000 treasury data row returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US Treasury Data Feed: yield curve, debt, auctions and rates

**One actor for the official US Treasury numbers people check every day.** Pick a dataset and get clean rows you can schedule, chart or push to alerts: the **daily Treasury yield curve** (1 month to 30 year, nominal or real) with the 10Y-2Y spread, inversion flag and day-over-day change in basis points, **national debt to the penny**, **Treasury securities auctions** (offering, bid-to-cover, yields, bidder shares), **average interest rates** on Treasury securities and the **Treasury exchange rates** table. Delta mode returns only rows you have not seen yet.

**First run cost:** the default run returns the last 25 daily yield curves for about **$0.02** at **$0.0008 per result** (the first 5 seconds of compute are covered by Apify). 1,000 results cost about **$0.80**, less on higher Apify plans.

### Who it is for

- **Traders, analysts and newsletter writers** who want the daily curve, the 2s10s spread and the inversion flag without scraping a page.
- **Fintech and macro dashboards** that need the national debt, average interest rates and Treasury FX in one consistent JSON feed.
- **Fixed-income researchers** studying auction demand: bid-to-cover, indirect/direct/dealer shares, offering size by term.
- **AI agents** that answer "what is the 10 year yield today" with a citable official source.

### Datasets

| `dataset` | One row is | Key fields |
|---|---|---|
| `yield-curve` | one trading day | `rates` (1M to 30Y), `yield2Y`, `yield10Y`, `yield30Y`, `spread10y2yPct`, `spread10y3mPct`, `inverted10y2y`, `change1dBp` |
| `debt` | one day | `totalPublicDebtOutstanding`, `debtHeldByPublic`, `intragovernmentalHoldings`, `change1d` |
| `auctions` | one auction | `cusip`, `securityType`, `securityTerm`, `auctionDate`, `offeringAmount`, `bidToCover`, `highYield`, `indirectSharePct`, `status` (announced, results-pending, auctioned) |
| `average-interest-rates` | one security group per month | `security`, `avgInterestRatePct` |
| `exchange-rates` | one currency per quarter | `countryCurrency`, `perUsd`, `effectiveDate` |

### Input

| Field | Meaning |
|---|---|
| `dataset` | one of the five datasets above (default `yield-curve`) |
| `sinceDays` | look back window; empty = a sensible default per dataset |
| `curve` | `nominal` or `real` (yield-curve only) |
| `securityType`, `securityTerm` | auctions filters, for example `Note` and `10-Year` |
| `search` | text filter for average rates (security) or exchange rates (country or currency) |
| `maxItems` | cap on rows and cost (default 25) |
| `onlyNewSinceLastRun`, `stateKey` | delta mode; auctions come back again when results are published |

Default input:

```json
{ "dataset": "yield-curve", "maxItems": 25 }
```

10-year note auctions of the last 6 months:

```json
{ "dataset": "auctions", "securityType": "Note", "securityTerm": "10-Year", "sinceDays": 180, "maxItems": 50 }
```

### Sample output: yield curve (trimmed)

```json
{
  "dataset": "yield-curve",
  "date": "2026-11-20",
  "curve": "nominal",
  "yield2Y": 4.63,
  "yield10Y": 4.92,
  "yield30Y": 5.31,
  "spread10y2yPct": 0.29,
  "inverted10y2y": false,
  "change1dBp": { "2Y": -13, "10Y": -12, "30Y": -9 }
}
```

### FAQ

**Where does the data come from?** The daily yield curve comes from the US Treasury's published par yield curve rates (home.treasury.gov). Debt, auctions, average rates and exchange rates come from the Fiscal Service FiscalData API (api.fiscaldata.treasury.gov). Both are official, free and need no key.

**How fresh is each dataset?** The yield curve updates each trading day. Debt to the penny updates each business day. Auctions, average rates and exchange rates follow the Fiscal Service publishing schedule: the auctions dataset can trail the calendar by a few weeks, so recent auctions can show `results-pending` until Treasury publishes the numbers. Run with delta mode and you get them again when they land.

**What is `change1dBp`?** Change versus the previous trading day in basis points (0.01 percentage point).

**Is the yield `high yield` for bills?** For bills the `highYield` field carries the investment rate (falls back to the discount rate); the discount rate is also returned separately.

**Do I need an API key?** No.

**Is it financial advice?** No. It is a data feed; check the official Treasury source before trading decisions.

### Terms and robots evidence (checked 2026-11-21)

- FiscalData API documentation (https://fiscaldata.treasury.gov/api-documentation/), License and Authorization: "The data is offered free, without restriction, and available to copy, adapt, redistribute, or otherwise use for non-commercial or commercial purposes."
- `fiscaldata.treasury.gov/robots.txt`: `User-agent: *  Allow: /`. `api.fiscaldata.treasury.gov` has no robots.txt (404).
- `home.treasury.gov/robots.txt`: `User-agent: *  Allow: /`. The yield curve CSV is the download offered on the Treasury's own interest-rate page.
- The actor identifies itself with a descriptive User-Agent, makes a handful of requests per run and retries politely.
- TreasuryDirect.gov is deliberately not used: its robots.txt disallows automated access.

### Integrations

Schedule each weekday evening, send a Slack or email alert when `inverted10y2y` flips, chart the curve in Google Sheets, or call it from an AI agent through the Apify MCP server. Export JSON, CSV or Excel.

### Pricing

Pay per result: **$0.0008 per row** (volume tiers on higher Apify plans), plus Apify's usual start event. Only rows returned are billed; `maxItems` caps the bill.

### Related actors

- Fuel Prices EU Open Data for energy price feeds.
- US Tariff HTS Lookup for trade data.
- SEC 8-K Material Events and SEC Form 4 Insider Transactions for market-moving filings.

### Changelog

- 1.0: first release (yield curve with spreads and changes, debt, auctions, average rates, exchange rates, delta mode).

# Actor input Schema

## `dataset` (type: `string`):

Which official Treasury series to return.

## `sinceDays` (type: `integer`):

How far back to go. Leave empty for a sensible default per dataset (yield curve 30, debt 30, auctions 45, average rates 120, exchange rates 200).

## `curve` (type: `string`):

Nominal par yields or real (inflation-indexed, TIPS) yields.

## `securityType` (type: `string`):

Optional filter.

## `securityTerm` (type: `string`):

Optional exact term, e.g. 10-Year, 2-Year, 13-Week, 30-Year.

## `search` (type: `string`):

Average interest rates: security name contains (e.g. Notes, Bills, Inflation). Exchange rates: country or currency contains (e.g. Japan, Euro, Peso).

## `maxItems` (type: `integer`):

Upper bound on rows (and on cost).

## `onlyNewSinceLastRun` (type: `boolean`):

Skip rows returned by an earlier run with the same state name. Auction rows come back again when their results are published. The first run returns everything and sets the baseline.

## `stateKey` (type: `string`):

Use different names to keep separate watchlists.

## Actor input object example

```json
{
  "dataset": "yield-curve",
  "curve": "nominal",
  "securityType": "",
  "maxItems": 25,
  "onlyNewSinceLastRun": false,
  "stateKey": "default"
}
```

# Actor output Schema

## `results` (type: `string`):

One row per day, auction, month or currency depending on the chosen dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "dataset": "yield-curve",
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/us-treasury-data-feed").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "dataset": "yield-curve",
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/us-treasury-data-feed").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "dataset": "yield-curve",
  "maxItems": 25
}' |
apify call datacrate/us-treasury-data-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datacrate/us-treasury-data-feed"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uYbU02LL8K0hlZZZm/builds/f7TeM2Y4tKr77FmFy/openapi.json
