Lab API
Flow Pin Risk
Flow Pin Risk API
0-100 pin-risk score for the nearest expiry with magnet strike, distance to magnet, time to close, and a breakdown of the four sub-scores that compose the total.
Works with CME index futures.
Pass
ES=F or NQ=F and URL-encode the = as %3D - e.g. /v1/flow/pin-risk/ES%3DF. Options-on-futures are priced with Black-76 using the CME multiplier ($50/pt ES, $20/pt NQ); CME index futures are Growth-tier. See the futures hub.
Endpoint
Auth required (
X-Api-Key)
Rate Limited: Yes
Growth plan+
Parameters
| Name | In | Required | Default | Description |
|---|---|---|---|---|
symbol |
path | yes | - | Underlying symbol |
expiry |
query | no | all expiries | Filter chain to a single expiry (yyyy-MM-dd). Omit to aggregate across all expiries |
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://lab.flashalpha.com/v1/flow/pin-risk/SPY"
import requests
resp = requests.get(
"https://lab.flashalpha.com/v1/flow/pin-risk/SPY",
headers={"X-Api-Key": "YOUR_API_KEY"}
)
data = resp.json()
print(f"Pin risk: {data['live_pin_risk']}/100")
print(f"Magnet strike: {data['magnet_strike']}")
const resp = await fetch(
"https://lab.flashalpha.com/v1/flow/pin-risk/SPY",
{ headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
const data = await resp.json();
console.log(`Pin risk: ${data.live_pin_risk}/100`);
console.log(`Magnet strike: ${data.magnet_strike}`);
Response
{
"symbol": "SPY",
"as_of": "2026-05-12T18:42:10Z",
"underlying_price": 597.505,
"expiry": "2026-05-15",
"live_pin_risk": 72,
"magnet_strike": 597.0,
"distance_to_magnet_pct": 0.085,
"time_to_close_hours": 2.31,
"breakdown": {
"oi_score": 22,
"proximity_score": 24,
"time_score": 18,
"gamma_score": 8
}
}
Key Response Fields
| Field | Type | Description |
|---|---|---|
symbol | string | Underlying symbol |
as_of | string | ISO 8601 timestamp |
underlying_price | number | Current price of underlying |
live_pin_risk | number | Composite 0-100 pin risk score for the nearest expiry |
magnet_strike | number | Strike with the largest absolute live net GEX |
distance_to_magnet_pct | number | |spot - magnet| / spot (percent), to three decimal places |
time_to_close_hours | number | Hours until nearest-expiry close (floored at 0.1) |
breakdown | object | Sub-scores that sum to live_pin_risk (see table below) |
Breakdown Sub-Scores
| Field | Type | Description |
|---|---|---|
oi_score | number | How concentrated open interest is around the magnet strike. Higher when OI is stacked near spot |
proximity_score | number | How close spot is to the magnet strike. Higher when distance_to_magnet_pct is small |
time_score | number | Time-decay weight. Higher as time_to_close_hours shrinks toward the nearest-expiry close |
gamma_score | number | Magnitude of live net GEX at the magnet strike. Higher when dealer gamma anchoring at the magnet is strong |
About Flow Pin Risk
Flow Pin Risk gives you a single 0-100 score for how likely spot is to settle near a magnet strike at the nearest expiry, plus the four sub-scores that produced it. The settled equivalent inside /v1/maxpain uses morning-broadcast OI and stays fixed all session. This endpoint rebuilds the OI-concentration and gamma sub-scores on top of the OI simulator's effective open interest, so the magnet strike and the score itself drift as positioning flows into or out of the at-the-money strikes during the session.
Common Use Cases
- Gate 0DTE pin trades on
live_pin_risk- only size into a pin (iron fly, short straddle) when the 0-100 score crosses your conviction threshold, and stand aside below it - Target the
magnet_strike- anchor strike selection and EOD price targets to the magnet, and re-center when it jumps to a new strike intraday - Diagnose the score with
breakdown- readoi_score,proximity_score,time_score, andgamma_scoreto know whether a high reading is OI-driven (durable) or just proximity/time (fragile) - Time the last-hour pin - combine a low
time_to_close_hourswith a risingtime_scoreto catch the classic end-of-day pin tightening - Filter on
distance_to_magnet_pct- skip "high score, far magnet" setups where spot is too far from the magnet for the pin to realistically resolve before close - Overlay portfolio risk - flag open positions whose short strikes sit on or near a high-score
magnet_strikeso you can hedge assignment/pin risk into expiry
Related
Related reading
- Live 0DTE pin risk: the flow-adjusted magnet - how the magnet and score drift on effective OI through the session
- Pin risk score 0-100: reading the 0DTE pin magnet - what each sub-score means and how to act on the total
Complementary endpoints
- Live Flow Levels - live max pain and walls that frame where the magnet sits
- Max Pain - the settled max-pain baseline behind the pin thesis
- 0DTE Analytics - the broader same-day-expiry context around the pin
- Live Flow GEX - the live gamma profile that anchors price to the magnet strike
Ready to build?
Get your free API key and start pulling live options data in 30 seconds.