# SOFR Averages & Index API
> The SOFR term reference rates that actually price US dollar floating-rate loans and notes, live from the Federal Reserve Bank of New York's public markets API — no key, nothing stored. Now that LIBOR is gone, trillions of dollars of loans, FRNs and derivatives reference SOFR, but almost none of them reference the overnight SOFR fixing directly: they reference the New York Fed's compounded SOFR Averages (30-, 90- and 180-day) and the SOFR Index, the backward-looking term rates that turn the daily fixing into a usable loan rate. The rates endpoint returns the three averages, the SOFR Index value and a plain-language read of the term-average slope (with the overnight SOFR for context). The accrual endpoint is the operational one: give it a start and end date and it computes the realized compounded SOFR over that period straight from the SOFR Index — the exact arithmetic (Index_end / Index_start − 1, ACT/360) a loan servicer or FRN desk runs to settle an interest period, with the resulting rate and dollar interest. The history endpoint returns the averages and index as a daily time series. This is the SOFR term-rate / accrual cut — distinct from the overnight money-market benchmark board (the daily SOFR fixing, without the compounded averages or the index) and from the funding-spread stress monitor (the spreads between overnight rates, not the term reference rates).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/sofraverages-api/..."
```

## Pricing
- **Free** (Free) — 780 calls/Mo, 2 req/s
- **Starter** ($13/Mo) — 17,400 calls/Mo, 6 req/s
- **Pro** ($39/Mo) — 91,000 calls/Mo, 16 req/s
- **Business** ($87/Mo) — 505,000 calls/Mo, 40 req/s

## Endpoints

### Rates

#### `GET /v1/rates` — Current SOFR Averages, Index, term-slope and overnight SOFR

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sofraverages-api/v1/rates"
```

**Response:**
```json
{
    "data": {
        "note": "The New York Fed's published SOFR Averages (compounded backward-looking term rates over 30/90/180 calendar days) and the SOFR Index (the cumulative compounding factor used to derive a compounded rate between any two dates). These are the rates SOFR-linked loans and FRNs reference — not the overnight fixing, which is shown for context. Read fresh per call, lightly cached.",
        "source": "Federal Reserve Bank of New York, SOFR Averages & Index (SOFRAI)",
        "sofr_index": 1.2467126,
        "term_slope": "term averages slope down (180d 3.68053 > 30d 3.59301, spread +0.088%): the overnight rate has been falling, so longer look-backs still carry older, higher fixings",
        "average_30day": 3.59301,
        "average_90day": 3.63674,
        "average_180day": 3.68053,
        "effective_date": "2026-06-11",
        "overnight_sofr": {
            "rate": 3.59,
            "effective_date": "2026-06-10",
            "volume_billions": 3023
        }
    },
    "meta": {
        "timestamp": "2026-06-12T10:34:31.693Z",
        "request_id": "9a1242f7-c569-4b83-981a-464a4195c76e"
    },
    "status": "ok",
    "message": "SOFR averages retrieved successfully",
    "success": true
}
```

### Accrual

#### `GET /v1/accrual` — Realized compounded SOFR + interest between two dates via the SOFR Index

**Parameters:**
- `start` (query, required, string) — Period start date (YYYY-MM-DD), within ~2 years of history Example: `2026-03-11`
- `end` (query, optional, string) — Period end date (YYYY-MM-DD), default latest Example: `2026-06-11`
- `principal` (query, optional, string) — Notional principal (default 1,000,000) Example: `1000000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sofraverages-api/v1/accrual?start=2026-03-11&end=2026-06-11&principal=1000000"
```

**Response:**
```json
{
    "data": {
        "days": 92,
        "note": "Realized compounded SOFR over the period, computed from the SOFR Index exactly as a loan servicer or FRN desk would settle an interest period. Dates resolve to the nearest published business day on-or-before the request. Read fresh per call, lightly cached.",
        "source": "Federal Reserve Bank of New York, SOFR Index",
        "formula": "compounded_sofr = (end_index / start_index − 1) × 360 / days; interest = principal × (end_index / start_index − 1)",
        "interest": 9296.19,
        "end_index": {
            "date": "2026-06-11",
            "value": 1.2467126
        },
        "principal": 1000000,
        "convention": "ACT/360",
        "start_index": {
            "date": "2026-03-11",
            "value": 1.23522967
        },
        "growth_factor": 1.0092961902,
        "end_date_requested": "2026-06-11",
        "compounded_sofr_pct": 3.63764,
        "start_date_requested": "2026-03-11"
    },
    "meta": {
        "timestamp": "2026-06-12T10:34:32.038Z",
        "request_id": "98732eef-8e91-4dc0-b094-8b5347ba1c6b"
    },
    "status": "ok",
    "message": "Compounded SOFR accrual computed successfully",
    "success": true
}
```

### History

#### `GET /v1/history` — Daily SOFR Averages (30/90/180-day) and SOFR Index time series

**Parameters:**
- `window` (query, optional, string) — Days of history (10-500, default 180) Example: `180`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sofraverages-api/v1/history?window=180"
```

**Response:**
```json
{
    "data": {
        "days": 180,
        "note": "Daily SOFR Averages (30/90/180-day) and SOFR Index time series over the window. Read fresh per call, lightly cached.",
        "source": "Federal Reserve Bank of New York, SOFR Averages & Index",
        "history": [
            {
                "date": "2025-09-22",
                "sofr_index": 1.21287066,
                "average_30day": 4.36337,
                "average_90day": 4.37096,
                "average_180day": 4.37974
            },
            {
                "date": "2025-09-23",
                "sofr_index": 1.21301014,
                "average_30day": 4.35603,
                "average_90day": 4.36917,
                "average_180day": 4.37855
            },
            {
                "date": "2025-09-24",
                "sofr_index": 1.21314896,
                "average_30day": 4.348,
                "average_90day": 4.36647,
                "average_180day": 4.37719
            },
            {
                "date": "2025-09-25",
                "sofr_index": 1.21328814,
                "average_30day": 4.33997,
                "average_90day": 4.36344,
                "average_180day": 4.376
            },
            {
                "date": "2025-09-26",
                "sofr_index": 1.21342902,
                "average_30day": 4.33328,
                "average_90day": 4.36109,
                "average_180day": 4.3751
            },
            {
                "date": "2025-09-29",
       
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/sofraverages-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "rates and meta take no parameters. accrual takes start (required, YYYY-MM-DD), end (optional, default latest) and principal (optional, default 1,000,000); it resolves each date to the nearest business day on-or-before and compounds via the SOFR Index (history covers roughly the last two years). history takes window (10-500 days, default 180). A 30-minute protective cache fronts the shared NY Fed upstream.",
        "source": "Federal Reserve Bank of New York markets API (SOFRAI + overnight SOFR), live",
        "service": "sofraverages-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rates": "Current 30/90/180-day SOFR Averages, the SOFR Index, term-slope read and overnight SOFR.",
            "GET /v1/accrual": "Realized compounded SOFR + interest between two dates via the SOFR Index (start=YYYY-MM-DD, end, principal).",
            "GET /v1/history": "Daily SOFR Averages & Index time series (window=180)."
        },
        "sofr_index": 1.2467126,
        "description": "SOFR Averages, Index & compounded accrual — the term reference rates that actually price SOFR-linked loans and floating-rate notes, live from the New York Fed's public markets API (no key, nothing stored). rates returns the 30/90/180-day compounded averages, the SOFR Index and a read of the term-average slope (with the overnight SOFR for context); accrual computes the realized compounded SOFR between any two dates straight fr
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/sofraverages-api
OpenAPI spec: https://www.oanor.com/api/sofraverages-api/openapi.json
