---
title: "Deribit BTC Max Pain — latest expiry + upcoming"
method: GET
path: "/api/v1/onchain/max-pain/latest"
tags: ["On-Chain"]
---

# Deribit BTC Max Pain — latest expiry + upcoming

`GET /api/v1/onchain/max-pain/latest`

## Request

- Base URL: `https://tradingstrategies.work`
- URL: `https://tradingstrategies.work/api/v1/onchain/max-pain/latest`
- Auth: HTTP bearer

Last finalized Deribit BTC options expiry (max_pain_strike, spot_at_expiry, spot_minus_max_pain_pct, put_call_ratio, total_notional_usd, is_monthly/is_quarterly) plus up to 10 upcoming expiries with current max-pain level, days_to_expiry and open_interest_contracts. days_to_expiry is clamped at 0 and cannot distinguish "settles later today" from "settled earlier today" — use settles_at (full ISO settlement timestamp) and hours_to_settlement (signed; negative = already settled, not yet finalized). settlement_time_utc names the assumed settlement time (08:00:00Z for DERIBIT_BTC, measured against the exchange: 868/868 open instruments at exactly 08:00:00 UTC). Markets without an evidenced settlement time return null for all three instead of a guess. Every expiry — upcoming included — now carries is_monthly, is_quarterly and expiry_type (daily | weekly | monthly | quarterly). These NEST rather than partition: quarterly is also monthly. expiry_type is the only field separating a Friday expiry from a mid-week one. All three derive from the calendar, which is why upcoming expiries can carry them at all. Read the open interest alongside the level: a daily expiry with 4,000 contracts and a monthly one with 150,000 are not the same observation. oi_available distinguishes "null" from "not collected". Note (2026-07-30): the monthly/quarterly flags were corrected — they previously marked a 7-day window rather than the actual last-Friday expiry. spot_at_expiry is the exchange settlement price (DERIBIT_BTC: Deribit delivery price, 30-min index TWAP before 08:00 UTC; IBIT: ETF close of the expiry day) — recomputed 2026-08-31 for all earlier rows, which had carried the BTCUSDT daily close. `include_strike_ladder=true` adds a `strike_ladder` per expiry: open interest per 2.5 % price band around the snapshot spot (±25 %, calls/puts separate, absolute contracts, share_pct), below_range/above_range sums, max_pain_recomputed and a day-over-day `delta` on the same band grid (null with delta_reason when no prior snapshot; settled expiry: anchored at the settlement price, delta_reason=settled). Open interest is a stock, not a side — no hedge direction follows; `strike_ladder_note` travels with the response. Omit the flag for the unchanged payload. Cron collects daily 02:00 UTC. [Free tier]

## Query parameters

- `market` 'DERIBIT_BTC'
- `include_strike_ladder` boolean
- `expiry_date` string, date
- `include_gex` boolean

## Response `200`

Latest max-pain expiry snapshot + upcoming expiries.

## Other responses

- `400`: Invalid input — fehlt Pflichtfeld oder Wert außerhalb des erlaubten Bereichs.
- `401`: Unauthenticated — kein gültiger Bearer-Token im Authorization-Header.
- `403`: Tier-Insufficient — Endpoint braucht höheren API-Tier. Response enthält upgrade_url.
- `404`: Not-Found — Resource existiert nicht oder gehört nicht dem aktuellen User.
- `429`: Rate-Limit überschritten — Tier-Quota (hourly/daily) oder Per-Endpoint-Quota erreicht. Retry-After-Header gesetzt.
- `500`: Internal Error.
- `503`: Upstream-Failure — Datenquelle nicht erreichbar (Binance, EODHD, etc.).

---

[API](https://skmtc.dev/tradingstrategies/apis/backtesting-arena-public-api.md) · [All operations](https://skmtc.dev/tradingstrategies/apis/backtesting-arena-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tradingstrategies/apis/backtesting-arena-public-api/revisions/f82e8d6eecd7?raw)
