# Variance Risk Premium API
> How much more volatility the options market is pricing in than the market has actually delivered — the carry that every short-volatility strategy harvests — computed live from Yahoo Finance, no key, nothing stored. Implied volatility (the VIX and its cousins) is almost always richer than the volatility that subsequently shows up: investors pay up for protection, and that gap, the variance risk premium, is one of the most persistent paid-for risks in markets. This API measures it directly across the major asset classes that publish an implied-vol index: for the S&P 500 (VIX), the Nasdaq 100 (VXN), crude oil (OVX) and gold (GVZ), it takes the live implied-vol index and subtracts the realised volatility actually delivered by the underlying over the matching ~30-day window (annualised standard deviation of daily log returns), and returns the premium in volatility points, the implied/realised ratio and a rich/cheap read. A large positive VRP means options are expensive relative to what the market has been doing (sellers are well paid); a negative VRP — implied below realised — is rare and flags that options are cheap, often during or right after a stress event. The premium endpoint returns all four markets ranked; the asset endpoint returns one market with 21- and 30-day realised legs; the history endpoint returns the VRP time series. This is the implied-minus-realised / variance-risk-premium cut for equities and commodities — distinct from the implied-vol level board (no realised leg), the realised-volatility dashboard (no implied leg) and the crypto-only DVOL/VRP API.

## 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/vrp-api/..."
```

## Pricing
- **Free** (Free) — 690 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 15,400 calls/Mo, 6 req/s
- **Pro** ($38/Mo) — 83,500 calls/Mo, 16 req/s
- **Mega** ($82/Mo) — 464,000 calls/Mo, 40 req/s

## Endpoints

### Premium

#### `GET /v1/premium` — Variance risk premium for all four markets, ranked

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

**Response:**
```json
{
    "data": {
        "note": "Variance risk premium = implied vol (the index) minus 21-day realised vol of the underlying, in annualised volatility points. Positive = options rich (the normal premium short-vol earns); negative = options cheap vs recent moves (stress signal). Read fresh per call, lightly cached.",
        "count": 4,
        "source": "Yahoo Finance",
        "markets": [
            {
                "name": "Crude Oil",
                "rank": 1,
                "read": "very rich — implied well above realised, sellers richly paid",
                "market": "oil",
                "underlying": "Crude Oil ETF (USO)",
                "implied_index": "OVX",
                "implied_vol_pct": 56.3,
                "realised_vol_21d_pct": 45.48,
                "realised_vol_30d_pct": 49.2,
                "implied_realised_ratio": 1.238,
                "variance_risk_premium_pts": 10.82
            },
            {
                "name": "Nasdaq 100",
                "rank": 2,
                "read": "rich — the normal positive variance risk premium",
                "market": "ndx",
                "underlying": "Nasdaq 100",
                "implied_index": "VXN",
                "implied_vol_pct": 30.44,
                "realised_vol_21d_pct": 26.17,
                "realised_vol_30d_pct": 24.02,
                "implied_realised_ratio": 1.163,
                "variance_risk_premium_pts": 4.27
            },
            {
                "name": "
…(truncated, see openapi.json for full schema)
```

### Asset

#### `GET /v1/asset` — One market's full VRP profile with 21/30-day realised legs

**Parameters:**
- `market` (query, required, string) — Market: spx, ndx, oil or gold Example: `spx`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/vrp-api/v1/asset?market=spx"
```

**Response:**
```json
{
    "data": {
        "name": "S&P 500",
        "note": "implied_vol_pct is the live VIX index; realised legs are the annualised standard deviation of S&P 500 daily log returns over 21 and 30 trading days. variance_risk_premium_pts = implied - realised_21d. Read fresh per call, lightly cached.",
        "read": "rich — the normal positive variance risk premium",
        "market": "spx",
        "source": "Yahoo Finance (VIX vs S&P 500)",
        "underlying": "S&P 500",
        "implied_index": "VIX",
        "implied_vol_pct": 18.87,
        "realised_vol_21d_pct": 15.39,
        "realised_vol_30d_pct": 14.24,
        "implied_realised_ratio": 1.226,
        "variance_risk_premium_pts": 3.48
    },
    "meta": {
        "timestamp": "2026-06-12T10:34:35.551Z",
        "request_id": "d3dea696-b11d-47cc-a246-98b55502fe9f"
    },
    "status": "ok",
    "message": "Market VRP retrieved successfully",
    "success": true
}
```

### History

#### `GET /v1/history` — Daily VRP time series for one market

**Parameters:**
- `market` (query, required, string) — Market: spx, ndx, oil or gold Example: `spx`
- `days` (query, optional, string) — Days of history (60-1000) Example: `252`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/vrp-api/v1/history?market=spx&days=252"
```

**Response:**
```json
{
    "data": {
        "days": 252,
        "name": "S&P 500",
        "note": "Daily variance risk premium (implied VIX minus rolling 21-day realised vol of S&P 500). negative_vrp_days counts days implied fell below realised (stress). Read fresh per call, lightly cached.",
        "market": "spx",
        "source": "Yahoo Finance",
        "current": {
            "date": "2026-06-11",
            "vrp_pts": 4.05,
            "implied_vol_pct": 19.44,
            "realised_vol_pct": 15.39
        },
        "history": [
            {
                "date": "2025-06-11",
                "vrp_pts": 5.59,
                "implied_vol_pct": 17.26,
                "realised_vol_pct": 11.67
            },
            {
                "date": "2025-06-12",
                "vrp_pts": 6.51,
                "implied_vol_pct": 18.02,
                "realised_vol_pct": 11.51
            },
            {
                "date": "2025-06-13",
                "vrp_pts": 8.5,
                "implied_vol_pct": 20.82,
                "realised_vol_pct": 12.32
            },
            {
                "date": "2025-06-16",
                "vrp_pts": 6.48,
                "implied_vol_pct": 19.11,
                "realised_vol_pct": 12.63
            },
            {
                "date": "2025-06-17",
                "vrp_pts": 8.78,
                "implied_vol_pct": 21.6,
                "realised_vol_pct": 12.82
            },
            {
                "date": "2025-06-18",
  
…(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/vrp-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "premium and meta take no parameters. asset and history take market = spx, ndx, oil or gold (history also days, 60-1000, default 252). VRP = implied - 21-day realised, in annualised vol points; positive = options rich. A 10-minute protective cache fronts the shared Yahoo upstream.",
        "source": "Yahoo Finance (^VIX/^VXN/^OVX/^GVZ vs ^GSPC/^NDX/USO/GLD), live",
        "markets": [
            {
                "key": "spx",
                "implied": "VIX",
                "underlying": "S&P 500"
            },
            {
                "key": "ndx",
                "implied": "VXN",
                "underlying": "Nasdaq 100"
            },
            {
                "key": "oil",
                "implied": "OVX",
                "underlying": "Crude Oil ETF (USO)"
            },
            {
                "key": "gold",
                "implied": "GVZ",
                "underlying": "Gold ETF (GLD)"
            }
        ],
        "service": "vrp-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/asset": "One market's full VRP profile with 21- and 30-day realised legs (market=spx).",
            "GET /v1/history": "Daily VRP time series for one market (market=spx, days=252).",
            "GET /v1/premium": "Variance risk premium for all four markets, ranked richest to cheapest."
        },
        "description": "Variance risk premium (VRP) — how much more volatility the options 
…(truncated, see openapi.json for full schema)
```


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