1. Max Pain

Historical Max Pain Data API

Replay max pain, pain curve, dealer alignment, and pin probability at any minute since January 2017. Same shape as live /v1/maxpain. Deep dive →

HISTORICAL
SPY coverage
2017-01-03 → 2026-12-03
Granularity
1 minute
Plan
Alpha+
Format
JSON (REST)

Endpoint

GET/v1/maxpain/{symbol}?at=...&expiration=
Host: historical.flashalpha.com Auth required (X-Api-Key) Rate Limited: Yes Plan: Alpha+

Parameters

NameInTypeRequiredDefaultDescription
symbolpathstringrequired-Underlying symbol (e.g. SPY)
atquerydatetimerequired-As-of time, ET wall-clock: yyyy-MM-ddTHH:mm:ss for a minute, or yyyy-MM-dd for that trading day (resolves to 16:00 ET)
expirationquerydatefull chainExpiration date in yyyy-MM-dd format. Omit it to compute max pain over every expiry in the chain

Request

curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://historical.flashalpha.com/v1/maxpain/SPY?at=2026-03-05T15:30:00"
import requests

resp = requests.get(
    "https://historical.flashalpha.com/v1/maxpain/SPY",
    headers={"X-Api-Key": "YOUR_API_KEY"},
    params={"at": "2026-03-05T15:30:00"}
)
resp.raise_for_status()
data = resp.json()
print(f"Max pain: {data['max_pain_strike']} (spot is {data['distance']['direction']} it)")
const resp = await fetch(
  "https://historical.flashalpha.com/v1/maxpain/SPY?at=2026-03-05T15:30:00",
  { headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();
console.log(`Max pain: ${data.max_pain_strike} (spot is ${data.distance.direction} it)`);

Try it live

Replays archived data as of the at time you pick (ET wall-clock). Needs an Alpha plan API key.

GET

Response

{
  "symbol": "SPY",
  "underlying_price": 679.46,
  "as_of": "2026-03-05T15:30:00",
  "max_pain_strike": 684,
  "distance": {
    "absolute": 4.54,
    "percent": 0.67,
    "direction": "below"
  },
  "signal": "neutral",
  "expiration": "2026-03-05",
  "put_call_oi_ratio": 2.185,
  "pain_curve": [
    {
      "strike": 50,
      "call_pain": 0,
      "put_pain": 551065599000,
      "total_pain": 551065599000
    },
    {
      "strike": 55,
      "call_pain": 65000,
      "put_pain": 545888042000,
      "total_pain": 545888107000
    }
  ],
  "oi_by_strike": [
    {
      "strike": 50,
      "call_oi": 130,
      "put_oi": 24613,
      "total_oi": 24743,
      "call_volume": 0,
      "put_volume": 0
    },
    {
      "strike": 55,
      "call_oi": 1,
      "put_oi": 5236,
      "total_oi": 5237,
      "call_volume": 0,
      "put_volume": 0
    }
  ],
  "max_pain_by_expiration": [
    {
      "expiration": "2026-03-05",
      "max_pain_strike": 685,
      "dte": 0,
      "total_oi": 320189
    },
    {
      "expiration": "2026-03-06",
      "max_pain_strike": 687,
      "dte": 0,
      "total_oi": 896300
    }
  ],
  "dealer_alignment": {
    "alignment": "moderate",
    "description": "Max pain (684) between walls (675–685) but far from gamma flip (689.044055609965) - moderate alignment.",
    "gamma_flip": 689.0441,
    "gamma_flip_status": "available",
    "call_wall": 685,
    "put_wall": 675
  },
  "regime": "negative_gamma",
  "expected_move": {
    "straddle_price": 2.405,
    "atm_iv": 22.5,
    "max_pain_within_expected_range": false
  },
  "pin_probability": 25,
  "endpoint_version": "2026.09.30",
  "data_as_of": {
    "node": "f3",
    "equity_feed": null,
    "equity_options_feed": null,
    "index_feed": null,
    "index_options_feed": null,
    "futures_feed": null,
    "futures_options_feed": null,
    "flow_feed": null,
    "oi_feed": null,
    "macro_feed": null
  },
  "archive_as_of": {
    "node": "f3",
    "equity_feed": "2026-03-05T20:30:00Z",
    "equity_options_feed": "2026-03-05T19:59:00Z",
    "index_feed": null,
    "index_options_feed": null,
    "futures_feed": null,
    "futures_options_feed": null,
    "flow_feed": null,
    "oi_feed": "2026-03-04T21:00:00Z",
    "macro_feed": null
  }
}

Sending request…

See this endpoint on archived data

Send this exact request and the real response shows up here, right next to the example.

Response Fields

FieldTypeDescription
symbolstringUnderlying symbol
underlying_pricenumberSpot price at as_of
as_ofstringMinute the data was resolved to (ET wall-clock)
max_pain_strikenumberStrike where total option holder pain (intrinsic value) is lowest
distanceobjectabsolute (dollars) and percent from spot, and direction (above, below or at): where spot sits relative to max pain
signalstringbullish (spot 5% or more below max pain), bearish (spot 5% or more above max pain) or neutral (within 5%)
expirationstringThe requested expiry. When expiration is omitted, max pain covers the full chain and this field shows the nearest expiry in it
put_call_oi_rationumberTotal put OI divided by total call OI
pain_curve[]arrayPain at each strike: call_pain, put_pain, total_pain (USD)
oi_by_strike[]arrayPer strike: call_oi, put_oi, total_oi, call_volume, put_volume
max_pain_by_expiration[]arrayMax pain per expiry with dte and total_oi
dealer_alignmentobjectalignment (converging / moderate / diverging), description, gamma_flip, call_wall, put_wall
regimestringpositive_gamma, negative_gamma or unknown
expected_moveobjectstraddle_price, atm_iv and max_pain_within_expected_range
pin_probabilitynumber0-100 composite pin score
distance.absolutenumberDollar distance from spot to max pain
distance.percentnumberPercentage distance from spot to max pain
distance.directionstringabove, below, or at - spot relative to max pain
pain_curve[].strikenumberStrike price
pain_curve[].call_painnumberPain curve: call pain
pain_curve[].put_painnumberPain curve: put pain
pain_curve[].total_painnumberPain curve: total pain
oi_by_strike[].strikenumberStrike price
oi_by_strike[].call_oinumberCall open interest
oi_by_strike[].put_oinumberPut open interest
oi_by_strike[].total_oinumberOI by strike: total OI
oi_by_strike[].call_volumenumberCall volume
oi_by_strike[].put_volumenumberPut volume
max_pain_by_expiration[].dtenumberCalendar days to expiration, counted from the date of your request, not from at, and floored at 0 (so expiries before today read 0)
max_pain_by_expiration[].total_oinumberMax pain by expiration: total OI
max_pain_by_expiration[].expirationstringExpiration date (yyyy-MM-dd)
max_pain_by_expiration[].max_pain_strikenumberStrike where total option holder pain (intrinsic value) is lowest
dealer_alignment.alignmentstringconverging (max pain near gamma flip, between walls), moderate (between walls, far from flip), diverging (outside walls), unknown (insufficient data)
dealer_alignment.descriptionstringPlain-English description
dealer_alignment.gamma_flipnumberNullable underlying price where aggregate repriced GEX crosses from negative to positive.
dealer_alignment.gamma_flip_statusstringavailable when gamma_flip is a certified level; any other value means the level is unverified or missing. See GEX.
dealer_alignment.call_wallnumberCall wall strike
dealer_alignment.put_wallnumberPut wall strike
expected_move.straddle_pricenumberATM straddle mid price
expected_move.atm_ivnumberATM implied volatility (percentage, e.g. 18.4 = 18.4%)
expected_move.max_pain_within_expected_rangebooleanWhether max pain is within the straddle-implied expected move
endpoint_version, data_as_of, archive_as_ofstring, objectResponse envelope, see Response envelope.

Errors

Status Error When
400invalid_atat is not yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss (ET).
400invalid_expirationexpiration is not yyyy-MM-dd.
400-A query value has the wrong type, or a required value is missing. The body is an RFC 7807 problem-details object with errors.<param>.
401-Missing or invalid X-Api-Key. The body is empty; check the status code before parsing JSON.
403tier_restrictedYour plan is below Alpha. The body includes current_plan and required_plan.
404no_dataNo archived data for this symbol at at.
429Quota exceededDaily quota used up. Retry-After gives the seconds until the reset at 00:00 UTC. Rejected requests (including 403) count toward the quota.

What This Unlocks

  • Quantify how often price actually pinned to max_pain_strike across thousands of historical expiries.
  • Compare max pain vs gamma flip vs walls - use dealer_alignment to test which level predicted the close at minute granularity.
  • Build expiration-week dashboards showing how max_pain_strike evolved through the week via max_pain_by_expiration.
  • Model pin probability - backtest the published pin_probability against realized closes to calibrate its hit rate.
  • Read positioning skew - track put_call_oi_ratio and the pain_curve shape ahead of each expiry.

Related reading