Skip to content
GET /v1/curve

Whole yield curve with spreads, shape and inversion

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/yieldcurve-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/yieldcurve-api/v1/curve" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/yieldcurve-api/v1/curve", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/yieldcurve-api/v1/curve");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/yieldcurve-api/v1/curve",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "note": "Treasury constant-maturity yields in percent. A negative 10y-2y or 10y-3m spread (inversion) has historically preceded US recessions.",
        "as_of": "2026-06-08T18:59:53.000Z",
        "curve": [
            {
                "label": "3-Month",
                "years": 0.25,
                "maturity": "3m",
                "yield_pct": 3.628,
                "change_bps": 0.3
            },
            {
                "label": "2-Year",
                "years": 2,
                "maturity": "2y",
                "yield_pct": 3.8,
                "change_bps": -2
            },
            {
                "label": "5-Year",
                "years": 5,
                "maturity": "5y",
                "yield_pct": 4.281,
                "change_bps": 0.1
            },
            {
                "label": "10-Year",
                "years": 10,
                "maturity": "10y",
                "yield_pct": 4.552,
                "change_bps": 1.6
            },
            {
                "label": "30-Year",
                "years": 30,
                "maturity": "30y",
                "yield_pct": 5.024,
                "change_bps": 2.5
            }
        ],
        "shape": "normal",
        "spreads": {
            "10y_2y": 0.752,
            "10y_3m": 0.924,
            "30y_5y": 0.743
        },
        "inverted": false
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:17.914Z",
        "request_id": "c45555b9-19cc-4bdb-a9f2-4a026523f366"
    },
    "status": "ok",
    "message": "Curve retrieved successfully",
    "success": true
}