GET
/api/v1/options/{underlying}/max-pain/historyStandard tier+ · 300 req/minHistorical max-pain strike — nearest expiry or per-expiry flavours.
Backed by `sentiment_index` rows written each cycle under `<ccy>_max_pain_<DDMMMYY>`. `flavour=nearest` (default) collapses to a single nearest-live-expiry series; `flavour=per-expiry` returns every (ts, expiry, strike) tuple from the last N days.
Path parameters
Segments of the URL path, validated server-side.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| underlying | enum | required | — | BTC or ETH. BTCETH |
Query parameters
All query parameters are optional unless marked required.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| flavour | enum | optional | nearest | Shape of the returned payload. nearestper-expiry |
| days | number | optional | 30 | Per-expiry window (1-365). |
| limit | number | optional | 500 | Nearest-flavour cap (1-5000). |
Response shape
Always wrapped in the standard envelope. Nullable fields are explicitly marked — treat missing numeric data as a real data-source gap, not as an error.
data payloadtypescript
// Wrapped in the standard envelope:
// {
// data: /* shape below */,
// meta?: { total?: number; limit?: number; offset?: number; ... }
// }
// nearest:
{ underlying, flavour, points: Array<{ ts, value }> }
// per-expiry:
{ underlying, flavour, days, current, history, underlyingPrice }Example
Copy the curl, replace YOUR_KEY with a real key from your dashboard, and run.
Requestbash
curl -sS "http://localhost:3000/api/v1/options/BTC/max-pain/history?flavour=nearest&limit=200"Responsejson
{ "data": { "underlying": "BTC", "flavour": "nearest", "points": [] }, "meta": { "total": 0, "limit": 200 } }Next
Check the error code reference, or get an API key to try the request against your own account.