> The markdown version of https://saferate.markets/docs

# Docs

One API key, from your [dashboard](https://saferate.markets/dashboard/keys), authenticates both the REST API and the MCP server.

Guide

Treasury indices

The eleven total-return indices: what each covers, how to read levels, returns and analytics, and the two date conventions.

## What is in the API

Every endpoint is a GET with the same key. Dates are optional almost everywhere and mean the most recent published day. Each group has an MCP tool serving the same data.

### Curves

MCP: get_treasury_curve, get_treasury_rate_history

| /v1/curves/zero | Fitted zero-coupon curve, with fit diagnostics |
| --- | --- |
| /v1/curves/par | Par yield curve, 3 months to 30 years |
| /v1/curves/money-market | Bill curve, 1 week to 1 year |
| /v1/curves/real | TIPS real yield curve |
| /v1/curves/breakeven | Breakeven inflation, nominal less real |
| /v1/curves/zero/history | Zero curve over a range |
| /v1/curves/money-market/history | Bill curve over a range |
| /v1/curves/real/history | Real curve over a range |
| /v1/curves/par/history | Par curve over a range |
| /v1/curves/diebold-li | Level, slope and curvature: the curve to regress on |
| /v1/curves/diebold-li/history | Diebold-Li factors over a range |

### Securities

MCP: get_treasury_security, list_treasury_securities

| /v1/securities | Every security priced on a day |
| --- | --- |
| /v1/on-the-run | On- and off-the-run securities by tenor |
| /v1/securities/{cusip} | One CUSIP: terms, auctions, latest price and analytics |
| /v1/securities/{cusip}/prices | Its daily prices |
| /v1/securities/{cusip}/analytics | Its daily duration, DV01, key rates and curve residual |

### Rich/cheap

MCP: get_treasury_rich_cheap

| /v1/rich-cheap | Notes and bonds furthest from the curve, ranked by z-score |
| --- | --- |

### Auctions

MCP: get_treasury_auctions

| /v1/auctions | Auctions in a date window: announced, auctioned and settled, with results |
| --- | --- |
| /v1/auctions/latest | Each term's latest result, with changes against up to six previous auctions |

### Indices

MCP: get_treasury_index

| /v1/indices | Every index, latest daily and month-end levels |
| --- | --- |
| /v1/indices/{code} | One index |
| /v1/indices/{code}/levels | Daily total-return levels |
| /v1/indices/{code}/returns | Month-, quarter- and year-to-date returns |
| /v1/indices/{code}/analytics | Yield, duration, convexity, key rates |
| /v1/indices/{code}/constituents | What it holds now |
| /v1/indices/{code}/constituents/{date} | What it held in a completed period |

### Calculators

MCP: price_treasury_security

| /v1/price/coupon | Price or yield a note or bond |
| --- | --- |
| /v1/price/bill | Price or yield a bill |

### Debt

MCP: get_treasury_debt

| /v1/debt | Federal debt from the monthly statement |
| --- | --- |
| /v1/strips | How much is held as STRIPS |

### Savings bonds

MCP: get_savings_bond_rates, value_savings_bond

| /v1/savings-bonds/rates | Series I and EE rates |
| --- | --- |
| /v1/savings-bonds/i/value | Value a Series I bond |
| /v1/savings-bonds/ee/value | Value a Series EE bond |

### Economic series

| /v1/series | FRED series we may redistribute: yields, inflation, jobs |
| --- | --- |
| /v1/series/catalogue | Which series are available |

## REST

The full reference is generated from the API itself: [https://api.saferate.markets/reference](https://api.saferate.markets/reference).

```
curl https://api.saferate.markets/v1/curves/zero \
  -H "Authorization: Bearer $SAFERATE_MARKETS_KEY"
```

## MCP

For AI assistants and agents. Streamable HTTP at `https://api.saferate.markets/mcp`, authenticated with the same key as a Bearer header.

Claude Code

```
claude mcp add --transport http saferate-markets https://api.saferate.markets/mcp \
  --header "Authorization: Bearer $SAFERATE_MARKETS_KEY"
```

Any client that reads an `mcpServers` file

```
{
  "mcpServers": {
    "saferate-markets": {
      "type": "http",
      "url": "https://api.saferate.markets/mcp",
      "headers": { "Authorization": "Bearer ${SAFERATE_MARKETS_KEY}" }
    }
  }
}
```

Keep the key in an environment variable rather than in the file. Sign-in based connection for claude.ai and Claude Desktop is not available yet.
