About this endpoint
What it does
Retrieves U.S. Treasury yield data for the selected curve and mode, including latest, date-specific, historical, spreads, or inversion results. The request body controls the date range, curve type, frequency, and optional maturity filter; the response returns a JSON object with billed units, row count, and an items array.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| date | String | No | For mode: date, the day you want in YYYY-MM-DD format. |
| mode | ENUM | No | One of latest, date, history, spreads, inversion. latest returns the newest yield curve; date returns one day (a holiday or weekend returns the previous business day); history returns every business day between startDate and endDate; spreads returns spread time series only; inversion returns periods when 10Y-2Y or 10Y-3M was negative inside the range. |
| curve | ENUM | No | One of nominal, real, bills, longterm. nominal is the daily par yield curve (1M-30Y, since 1990); real is the real yield curve / TIPS (5Y-30Y, since 2003); bills is T-bill bank discount and coupon equivalent rates (since 2002); longterm is the long-term composite and 20Y CMT (since 2000). spreads and inversion use the nominal curve. |
| limit | Integer | No | Maximum rows returned. Default 20. Must be between 1 and 100. |
| endDate | String | No | For history, spreads, and inversion: last day in YYYY-MM-DD format. Default is today. |
| frequency | ENUM | No | For history and spreads, one of daily, weekly, monthly. daily means every business day; weekly means the last business day of each week; monthly means the last business day of each month. |
| startDate | String | No | For history, spreads, and inversion: first day in YYYY-MM-DD format. Default is 30 days before endDate. Maximum range is 40 years. |
| maturities | String Array | No | Optional filter for maturities such as 2Y, 10Y, 3M, or 30Y. Empty means every maturity of the curve. Maximum 100 items. |
Response
Returns a JSON object with billed as an integer, count as an integer, and items as an array of objects. Each item contains date, unit, curve, source, yields, spreads, sourceUrl, inverted10y2y, and inverted10y3m.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| billed | Integer | No | Units charged for this call. Only result rows are billed; not-found, unavailable, and invalid rows are free. |
| count | Integer | No | Number of rows in items. |
| items | Object Array | No | Array of result objects. Each object includes date, unit, curve, source, yields, spreads, sourceUrl, inverted10y2y, and inverted10y3m. |
| items[].date | String | No | Result date. |
| items[].unit | String | No | Unit for the row. |
| items[].curve | String | No | Curve identifier for the row. |
| items[].source | String | No | Data source for the row. |
| items[].yields | Object | No | Yield values for the row. |
| items[].spreads | Object | No | Spread values for the row. |
| items[].sourceUrl | String | No | Source URL for the row. |
| items[].inverted10y2y | Boolean | No | Whether the 10Y-2Y spread is inverted for the row. |
| items[].inverted10y3m | Boolean | No | Whether the 10Y-3M spread is inverted for the row. |



