- Historical Replay
- Exposure Analytics
- 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
Host:
historical.flashalpha.com
Auth required (X-Api-Key)
Rate Limited: Yes
Plan: Alpha+
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
symbol | path | string | required | - | Underlying symbol (e.g. SPY) |
at | query | datetime | required | - | 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) |
expiration | query | date | full chain | Expiration 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.
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
| Field | Type | Description |
|---|---|---|
symbol | string | Underlying symbol |
underlying_price | number | Spot price at as_of |
as_of | string | Minute the data was resolved to (ET wall-clock) |
max_pain_strike | number | Strike where total option holder pain (intrinsic value) is lowest |
distance | object | absolute (dollars) and percent from spot, and direction (above, below or at): where spot sits relative to max pain |
signal | string | bullish (spot 5% or more below max pain), bearish (spot 5% or more above max pain) or neutral (within 5%) |
expiration | string | The requested expiry. When expiration is omitted, max pain covers the full chain and this field shows the nearest expiry in it |
put_call_oi_ratio | number | Total put OI divided by total call OI |
pain_curve[] | array | Pain at each strike: call_pain, put_pain, total_pain (USD) |
oi_by_strike[] | array | Per strike: call_oi, put_oi, total_oi, call_volume, put_volume |
max_pain_by_expiration[] | array | Max pain per expiry with dte and total_oi |
dealer_alignment | object | alignment (converging / moderate / diverging), description, gamma_flip, call_wall, put_wall |
regime | string | positive_gamma, negative_gamma or unknown |
expected_move | object | straddle_price, atm_iv and max_pain_within_expected_range |
pin_probability | number | 0-100 composite pin score |
distance.absolute | number | Dollar distance from spot to max pain |
distance.percent | number | Percentage distance from spot to max pain |
distance.direction | string | above, below, or at - spot relative to max pain |
pain_curve[].strike | number | Strike price |
pain_curve[].call_pain | number | Pain curve: call pain |
pain_curve[].put_pain | number | Pain curve: put pain |
pain_curve[].total_pain | number | Pain curve: total pain |
oi_by_strike[].strike | number | Strike price |
oi_by_strike[].call_oi | number | Call open interest |
oi_by_strike[].put_oi | number | Put open interest |
oi_by_strike[].total_oi | number | OI by strike: total OI |
oi_by_strike[].call_volume | number | Call volume |
oi_by_strike[].put_volume | number | Put volume |
max_pain_by_expiration[].dte | number | Calendar 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_oi | number | Max pain by expiration: total OI |
max_pain_by_expiration[].expiration | string | Expiration date (yyyy-MM-dd) |
max_pain_by_expiration[].max_pain_strike | number | Strike where total option holder pain (intrinsic value) is lowest |
dealer_alignment.alignment | string | converging (max pain near gamma flip, between walls), moderate (between walls, far from flip), diverging (outside walls), unknown (insufficient data) |
dealer_alignment.description | string | Plain-English description |
dealer_alignment.gamma_flip | number | Nullable underlying price where aggregate repriced GEX crosses from negative to positive. |
dealer_alignment.gamma_flip_status | string | available when gamma_flip is a certified level; any other value means the level is unverified or missing. See GEX. |
dealer_alignment.call_wall | number | Call wall strike |
dealer_alignment.put_wall | number | Put wall strike |
expected_move.straddle_price | number | ATM straddle mid price |
expected_move.atm_iv | number | ATM implied volatility (percentage, e.g. 18.4 = 18.4%) |
expected_move.max_pain_within_expected_range | boolean | Whether max pain is within the straddle-implied expected move |
endpoint_version, data_as_of, archive_as_of | string, object | Response envelope, see Response envelope. |
Errors
| Status | Error | When |
|---|---|---|
400 | invalid_at | at is not yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss (ET). |
400 | invalid_expiration | expiration 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. |
403 | tier_restricted | Your plan is below Alpha. The body includes current_plan and required_plan. |
404 | no_data | No archived data for this symbol at at. |
429 | Quota exceeded | Daily 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_strikeacross thousands of historical expiries. - Compare max pain vs gamma flip vs walls - use
dealer_alignmentto test which level predicted the close at minute granularity. - Build expiration-week dashboards showing how
max_pain_strikeevolved through the week viamax_pain_by_expiration. - Model pin probability - backtest the published
pin_probabilityagainst realized closes to calibrate its hit rate. - Read positioning skew - track
put_call_oi_ratioand thepain_curveshape ahead of each expiry.
Related Historical Endpoints
- Historical GEX
- Historical 0DTE
- Historical Gamma Levels
- Max Pain (live) - the live version of this endpoint
Related reading
- Replaying GEX, VRP & dealer positioning - how max pain fits alongside dealer-flow analytics in a backtest