---
title: "Yield Curve"
method: GET
path: "/treasury-yields/curve"
tags: ["Economics"]
---

# Yield Curve

`GET /treasury-yields/curve`

## Request

- Base URL: `https://api.dataporium.io`
- URL: `https://api.dataporium.io/treasury-yields/curve`
- Auth: API key in query parameter `apikey`

The US Treasury yield curve on one day compared with the curve 1 week, 1, 3 or 6 months, or 1, 2 or 5 years earlier, with the 10-year minus 2-year and 10-year minus 3-month spreads.

All parameters are optional. The answer is {as_of, curves: [{label, date, points, spread_10y_2y, spread_10y_3m, inverted_10y_2y}], about}.

## Query parameters

- `date` string
- `compare` string

## Response `200`

Successful response (JSON).

- object

## Other responses

- `401`: No API key in the request.
- `403`: The API key is not valid or has expired.

---

[API](https://skmtc.dev/dataporium/apis/dataporium-data-api.md) · [All operations](https://skmtc.dev/dataporium/apis/dataporium-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dataporium/apis/dataporium-data-api/revisions/8bc593179dc8?raw)
