---
title: US Treasury Yield Curve API
slug: us-treasury-yield-curve
url: https://apyhub.com/martin10291/service/us-treasury-yield-curve
provider: Martin Petrov
categories: [Retrieval Kit]
tags: [treasury-yields, yield-curve, us-treasuries, bond-rates, spread-analysis, inversion-detection]
auth: api_key
version: 1.0
service_type: sync
endpoints: 1
atoms: 100
mcp: true
---

# US Treasury Yield Curve API

US Treasury Yield Curve API returns latest, date, history, spreads, or inversion data from a curve you choose. Get JSON rows. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/martin10291/us-treasury-yield-curve` | What it does Retrieves U.S. Treasury yield data for the selected curve and mode, including latest,… | 100 |

## Endpoint reference

### Treasury Yields API - US Yield Curve, Daily Rates, History

`POST https://api.eu.apyhub.com/martin10291/us-treasury-yield-curve` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `date` | body | string | no | For mode date: the day you want, YYYY-MM-DD, for example 2024-03-15. |
| `mode` | body | string | no | latest = the newest yield curve; date = one day (a holiday or weekend returns the previous business day and says so); history = every business day between Start and End date; spreads = spread time se… |
| `curve` | body | string | no | nominal = daily par yield curve (1M-30Y, since 1990); real = real yield curve / TIPS (5Y-30Y, since 2003); bills = T-bill bank discount and coupon equivalent rates (since 2002); longterm = long-term… |
| `limit` | body | integer | no | Maximum rows returned (newest kept when the range is longer). Between 1 and 20000. Default: `20`. Example: `1000`. |
| `endDate` | body | string | no | For history, spreads and inversion: last day, YYYY-MM-DD. Default today. |
| `frequency` | body | string | no | For history and spreads: daily (every business day), weekly (last business day of each week) or monthly (last business day of each month). One of: daily, weekly, monthly. Example: `daily`. |
| `startDate` | body | string | no | For history, spreads and inversion: first day, YYYY-MM-DD. Default 30 days before End date. Max range 40 years. |
| `maturities` | body | array of string | no | Optional filter, for example 2Y, 10Y, 3M, 30Y. Empty = every maturity of the curve. |

#### Quickstart

Fetch the latest treasury yields with the default nominal curve.

```bash
curl -X POST "https://api.eu.apyhub.com/martin10291/us-treasury-yield-curve" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"latest","curve":"nominal"}'
```

#### What you'll get back

Returns a JSON object with `billed` as an integer, `count` as an integer, and `items` as an array of result objects.

Each item may include `date`, `unit`, `curve`, `source`, `yields`, `spreads`, `sourceUrl`, `inverted10y2y`, and `inverted10y3m`.

```json
{
  "billed": 1,
  "count": 1,
  "items": [
    {
      "date": "2024-03-15",
      "unit": "percent",
      "curve": "nominal",
      "source": "Treasury",
      "yields": {},
      "spreads": {},
      "sourceUrl": "https://www.treasury.gov",
      "inverted10y2y": false,
      "inverted10y3m": false
    }
  ]
}
```

## About

## What it does

The US Treasury Yield Curve API returns U.S. yield curve data in one request. Send a `mode`, choose a `curve`, and add date or range fields when you need them. Use `latest` for the newest curve, `date` for one day, `history` for a time series, `spreads` for spread rows, or `inversion` for negative spread periods.

Choose `nominal`, `real`, `bills`, or `longterm`. For history-style calls, set `startDate`, `endDate`, and `frequency` to control the range and spacing. Use `limit` to cap the number of rows. Add `maturities` when you want only some terms, such as 2Y or 10Y.

The response gives billed units, row count, and an items list. Each row can include the date, curve name, source, yield values, spread values, a source link, and inversion flags.

Teams use it to build rate charts, Treasury dashboards, and macro data tools. They also use the US Treasury Yield Curve API to flag yield spread changes in alert jobs and internal reports.

To compare U.S. yields with policy rates elsewhere, use the [Central Bank Interest Rates API](https://apyhub.com/martin10291/service/central-bank-interest-rates). For real-yield context, pair it with the [Country Inflation & CPI Data API](https://apyhub.com/martin10291/service/country-inflation-cpi-data).

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/martin10291/service/us-treasury-yield-curve
