# H.15 Treasury curve, real yields & spreads (QuantSet API)

> Daily Federal Reserve H.15 constant-maturity yields (1Y to 30Y), effective Fed Funds rate, 10Y-2Y and 10Y-3M curve spreads, 10Y TIPS real yield and 10Y breakeven inflation.

> ## For AI agents
> The QuantSet API is at https://api.quantset.dev. Send the key in the `X-API-Key` header. The sandbox key `mw_demo` needs no signup and reads the sample listings.
> No key yet? An agent can open an account on its own: https://api.quantset.dev/skill.md
> Connect an MCP client to https://api.quantset.dev/mcp. Client setup is at https://api.quantset.dev/agents.md.
> Start with https://api.quantset.dev/llms.txt or read the full reference at https://api.quantset.dev/llms-full.txt. The OpenAPI file is https://api.quantset.dev/openapi.json. Add `.md` to any docs URL to get that page as Markdown.

`GET https://api.quantset.dev/api/v1/macro/treasury-yields` · `get_macro_treasury_yields`

Send a key in the `X-API-Key` header.
Add `format=csv` to get a UTF-8 table.
Price: 1 credit for each successful request.

## Research questions

### Was the ten-year yield above or below the two-year yield?

```http
GET https://api.quantset.dev/api/v1/macro/treasury-yields?limit=10
```

Read spread_10y_2y_pct, yield_10y_pct and yield_2y_pct on the same observation date.

### How did nominal yields compare with real yields in the same week?

```http
GET https://api.quantset.dev/api/v1/macro/treasury-yields?start=2024-06-03&end=2024-06-07
```

Read the ten-year nominal, real and breakeven fields on matching dates and retain their percentage units.

## Reading the results

The nominal curve, the real ten-year yield and ten-year breakeven inflation describe different quantities. Keep their labels when charting them together.


## Coverage and limits

Observations can have different histories across series. A null spread cannot establish that the curve was flat.


## Related guides

- [Continue a snapshot-pinned read](https://quantset.dev/docs/guides/pagination)

## Parameters

- `start` (string, optional): First date to include, as an ISO date (YYYY-MM-DD).
- `end` (string, optional): Last date to include, as an ISO date (YYYY-MM-DD).
- `limit` (integer, 1 to 10,000, optional): Maximum number of rows to return.
- `cursor` (string, optional): Opaque continuation. Pass it unchanged with the original filters and snapshot_id.
- `snapshot_id` (string, optional): Pin the request to one immutable snapshot so a read across several pages stays consistent.
- `format` (json | csv, optional): Return a JSON page or UTF-8 CSV rows.
- `X-Max-Credits` (integer, 0 to 999,999,999,999, optional, in header): Refuse the request if its maximum charge exceeds this ceiling.
- `X-Workflow-Id` (string, optional, in header): Optional printable identifier for grouping charges in a research workflow.

## Response fields

- `date` (string): The trading day or observation date, YYYY-MM-DD.
- `fed_funds_pct` (number): In percent: 10 means 10%.
- `yield_1y_pct` (number): In percent: 10 means 10%.
- `yield_2y_pct` (number): In percent: 10 means 10%.
- `yield_3y_pct` (number): In percent: 10 means 10%.
- `yield_5y_pct` (number): In percent: 10 means 10%.
- `yield_7y_pct` (number): In percent: 10 means 10%.
- `yield_10y_pct` (number): In percent: 10 means 10%.
- `yield_20y_pct` (number): In percent: 10 means 10%.
- `yield_30y_pct` (number): In percent: 10 means 10%.
- `spread_10y_2y_pct` (number): In percent: 10 means 10%.
- `spread_10y_3m_pct` (number): In percent: 10 means 10%.
- `real_yield_10y_pct` (number): In percent: 10 means 10%.
- `breakeven_10y_pct` (number): In percent: 10 means 10%.

## Example

```
curl 'https://api.quantset.dev/api/v1/macro/treasury-yields?limit=10' -H 'X-API-Key: YOUR_API_KEY'
```

## Responses

- 200 Successful Response
- 400 Supply one credential.
- 401 Supply a valid API key.
- 402 Reduce the request ceiling or refill your credits.
- 403 Your key does not have the required access.
- 409 Start the read again with the current snapshot.
- 413 Reduce the page size before requesting CSV again.
- 422 Correct the named parameter and retry.
- 429 Wait for Retry-After seconds.
- 500 The request could not be completed.
- 503 Retry safe reads after a short delay.

## Which Treasury endpoint to use

- `/api/v1/treasury` (Treasury rates): The nominal yield curve from 1 month to 30 years.
- `/api/v1/macro/treasury-yields` (H.15 Treasury curve, real yields & spreads): The Federal Reserve's curve with the Fed Funds rate, curve spreads, real yields and breakeven inflation.

## Questions

**What does H.15 Treasury curve, real yields & spreads cost?** 1 credit for each successful request. A request that fails costs nothing.

**Which plan includes it?** Every account. Free credits, credit packs and subscriptions all read this data.

**How do I read more than one page?** When next_cursor is not null, send it back as cursor together with the same snapshot_id, and repeat until it is null.

**Can I get it as CSV or in a spreadsheet?** Yes. Add format=csv to the request. In Google Sheets, put that URL inside IMPORTDATA with a data-only key in apikey.

**Can an AI agent use this?** Yes. An agent calls it over HTTP like any client. Add .md to this page's address for a version written for agents.

**What does null mean in the response?** The value could not be confirmed. It is never a zero, so treat it as missing in your own calculations.

Group: Macro and FX
Docs page: https://quantset.dev/docs/api/macro-treasury-yields
Integrations & Ecosystem: https://quantset.dev/integrations (Claude/Cursor MCP, LangGraph, PydanticAI, CrewAI, Agno, Vercel AI SDK, Mastra, Sheets =QUANTSET(), Excel, Notion & x402)
Full API guide: https://api.quantset.dev/llms-full.txt
