- Live API Reference
- Flow Analytics
- 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.
Endpoint
X-Api-Key)
Rate Limited: Yes
Plan: Growth+
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
symbol |
path | string | required | - | Underlying symbol |
expiry |
query | date | all expiries | Filter chain to a single expiry (yyyy-MM-dd). Omit to aggregate across all expiries. Invalid values return 400 invalid_expiry. |
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 futures are Growth plan. See the futures hub.
Request
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"}
)
resp.raise_for_status()
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" } }
);
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();
console.log(`Pin risk: ${data.live_pin_risk}/100`);
console.log(`Magnet strike: ${data.magnet_strike}`);Try it live
Runs on live market data and uses 1 request from your daily quota.
Response
{
"symbol": "SPY",
"as_of": "2026-10-30T13:46:02.7128887Z",
"underlying_price": 760.24,
"expiry": null,
"live_pin_risk": 9,
"magnet_strike": 765,
"distance_to_magnet_pct": 0.626,
"time_to_close_hours": 6.233,
"breakdown": {
"oi_score": 26,
"proximity_score": 0,
"time_score": 4,
"gamma_score": 0
},
"endpoint_version": "2026.09.30",
"data_as_of": {
"node": "fa5",
"equity_feed": "2026-10-30T13:46:02.553Z",
"equity_options_feed": "2026-10-30T13:46:02Z",
"index_feed": "2026-10-30T13:46:02.132Z",
"index_options_feed": "2026-10-30T13:45:59Z",
"futures_feed": "2026-10-30T13:45:51.589Z",
"futures_options_feed": "2026-10-30T13:45:51.596Z",
"flow_feed": "2026-10-30T13:45:00Z",
"oi_feed": "2026-10-29T20:00:00Z",
"macro_feed": "2026-10-29T21:00:20Z"
}
}Sending request…
See this endpoint on live 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 |
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) |
expiry | string | null | The expiry filter from the request, null when it was omitted |
endpoint_version, data_as_of | string, object | Response envelope, see Response envelope. |
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 |
Errors
| Status | Error | When |
|---|---|---|
400 | invalid_expiry | expiry is not a valid yyyy-MM-dd date. |
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 Growth. The body includes current_plan and required_plan. |
404 | no_data | No data for the symbol. |
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. |
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
Unlock DEX, VEX and CHEX with Basic
Everything in Free, plus:
- DEX, VEX and CHEX exposure
- Full max pain
- ETF & index symbols SPY, QQQ, SPX, VIX
Go full-chain with Growth
Everything in Basic, plus:
- Full-chain GEX Every expiration
- 0DTE analytics
- Exposure summary & AI narrative
- CME futures & live screener
Add history and vol surfaces with Alpha
Everything in Growth, plus:
- Historical API replay Since 2017
- SVI vol surfaces
- VRP analytics
- Greeks surfaces Vanna, charm, volga and speed grids