# Crypto Options Max Pain & Open Interest API
> Where the crypto options market is positioned, and the strike toward which an expiry's open interest exerts the most "pain" — computed live from Deribit's public option book, no key, nothing stored. Max pain is the strike at which the total value of all open options is lowest at expiry: the price at which the greatest dollar amount of option open interest expires worthless and option writers keep the most premium. Traders watch it because price often gravitates toward max pain into a large expiry. The maxpain endpoint takes a currency (BTC, ETH, SOL, XRP) and an expiry and returns the max-pain strike, the spot/underlying, how far spot sits from max pain, and the call and put open-interest totals with the put/call OI ratio. The oi endpoint returns the full open-interest-by-strike distribution for an expiry — which strikes hold the most open interest, the magnets and walls (support & resistance) traders watch. The expiries endpoint lists every listed expiry with its aggregate open interest, contract count and call/put split. This is the aggregate options-positioning / max-pain analytics cut for crypto — distinct from the raw per-contract option chain (greeks/IV), from US equity options and from the crypto-volatility APIs in the catalogue. Currency is BTC, ETH, SOL or XRP; expiry is a Deribit code like 26JUN26.

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

## Pricing
- **Free** (Free) — 400 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 9,500 calls/Mo, 6 req/s
- **Pro** ($36/Mo) — 58,000 calls/Mo, 16 req/s
- **Business** ($82/Mo) — 310,000 calls/Mo, 40 req/s

## Endpoints

### Max Pain

#### `GET /v1/expiries` — Listed expiries with aggregate OI

**Parameters:**
- `currency` (query, required, string) — BTC, ETH, SOL or XRP Example: `BTC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/maxpain-api/v1/expiries?currency=BTC"
```

**Response:**
```json
{
    "data": {
        "count": 12,
        "source": "Deribit",
        "currency": "BTC",
        "expiries": [
            {
                "expiry": "12JUN26",
                "put_oi": 14352.1,
                "call_oi": 20873.8,
                "total_oi": 35225.9,
                "contracts": 80
            },
            {
                "expiry": "13JUN26",
                "put_oi": 3756.5,
                "call_oi": 1335.8,
                "total_oi": 5092.3,
                "contracts": 48
            },
            {
                "expiry": "14JUN26",
                "put_oi": 1190.1,
                "call_oi": 445.5,
                "total_oi": 1635.6,
                "contracts": 46
            },
            {
                "expiry": "15JUN26",
                "put_oi": 277.6,
                "call_oi": 501.3,
                "total_oi": 778.9,
                "contracts": 44
            },
            {
                "expiry": "19JUN26",
                "put_oi": 9275.2,
                "call_oi": 14128.4,
                "total_oi": 23403.6,
                "contracts": 60
            },
            {
                "expiry": "26JUN26",
                "put_oi": 66247.6,
                "call_oi": 85311.1,
                "total_oi": 151558.7,
                "contracts": 132
            },
            {
                "expiry": "3JUL26",
                "put_oi": 369.1,
                "call_oi": 246.6,
                "total_oi": 615.7,
         
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/maxpain` — Max-pain strike & put/call OI

**Parameters:**
- `currency` (query, required, string) — BTC, ETH, SOL or XRP Example: `BTC`
- `expiry` (query, optional, string) — Deribit expiry code (default nearest with OI) Example: `26JUN26`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/maxpain-api/v1/maxpain?currency=BTC&expiry=26JUN26"
```

**Response:**
```json
{
    "data": {
        "note": "max_pain_strike is the listed strike minimising total option-holder payout at settlement; price often drifts toward it into a large expiry. spot_vs_maxpain_pct > 0 means spot is above max pain.",
        "expiry": "26JUN26",
        "put_oi": 66247.6,
        "source": "Deribit",
        "call_oi": 85311.1,
        "currency": "BTC",
        "total_oi": 151558.7,
        "strikes_count": 66,
        "max_pain_strike": 74000,
        "underlying_price": 63513.25,
        "put_call_oi_ratio": 0.777,
        "spot_vs_maxpain_pct": -14.17
    },
    "meta": {
        "timestamp": "2026-06-12T01:41:14.786Z",
        "request_id": "0908c2c1-0422-4e51-a715-46907badde8e"
    },
    "status": "ok",
    "message": "Max pain retrieved successfully",
    "success": true
}
```

#### `GET /v1/oi` — Open-interest distribution by strike

**Parameters:**
- `currency` (query, required, string) — BTC, ETH, SOL or XRP Example: `BTC`
- `expiry` (query, optional, string) — Deribit expiry code Example: `26JUN26`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/maxpain-api/v1/oi?currency=BTC&expiry=26JUN26"
```

**Response:**
```json
{
    "data": {
        "note": "open interest by strike for the expiry; the highest-OI strikes act as magnets / walls (support & resistance).",
        "expiry": "26JUN26",
        "source": "Deribit",
        "strikes": 66,
        "currency": "BTC",
        "distribution": [
            {
                "put_oi": 4610.1,
                "strike": 20000,
                "call_oi": 102.6,
                "total_oi": 4712.7
            },
            {
                "put_oi": 3119.7,
                "strike": 30000,
                "call_oi": 81.2,
                "total_oi": 3200.9
            },
            {
                "put_oi": 3711.9,
                "strike": 40000,
                "call_oi": 34.2,
                "total_oi": 3746.1
            },
            {
                "put_oi": 4278.7,
                "strike": 45000,
                "call_oi": 46.4,
                "total_oi": 4325.1
            },
            {
                "put_oi": 3772.4,
                "strike": 50000,
                "call_oi": 373.3,
                "total_oi": 4145.7
            },
            {
                "put_oi": 1248.6,
                "strike": 52000,
                "call_oi": 0,
                "total_oi": 1248.6
            },
            {
                "put_oi": 3410.6,
                "strike": 55000,
                "call_oi": 237.1,
                "total_oi": 3647.7
            },
            {
                "put_oi": 421.1,
                "strike": 
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

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

**Response:**
```json
{
    "data": {
        "note": "currency is BTC, ETH, SOL or XRP. expiry is a Deribit code (e.g. 26JUN26) from /v1/expiries; omit it to use the nearest expiry carrying open interest. Open interest is in contracts. Read fresh per call, nothing cached.",
        "source": "Deribit public API (deribit.com/api/v2/public, live)",
        "service": "maxpain-api",
        "endpoints": {
            "GET /v1/oi": "Open-interest-by-strike distribution for an expiry (currency=BTC, expiry=26JUN26).",
            "GET /v1/meta": "This document.",
            "GET /v1/maxpain": "Max-pain strike, spot gap and put/call OI for a currency+expiry (currency=BTC, expiry=26JUN26).",
            "GET /v1/expiries": "Listed expiries with aggregate OI, contracts and notional (currency=BTC)."
        },
        "currencies": [
            "BTC",
            "ETH",
            "SOL",
            "XRP"
        ],
        "description": "Crypto options max pain and open-interest positioning, computed live from Deribit's public option book (no key, nothing stored). Max pain is the strike at which the most option open interest expires worthless — price often gravitates toward it into a large expiry. maxpain returns the max-pain strike, spot, the spot-vs-max-pain gap and call/put OI with the put/call ratio for a currency+expiry. oi returns the full open-interest-by-strike distribution (the magnets and walls). expiries lists every listed expiry with aggregate OI, contracts and notional. The aggregate op
…(truncated, see openapi.json for full schema)
```


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