Flow Pin Risk API - 0DTE Pin Score Breakdown - FlashAlpha Lab API
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.

Endpoint

GET /v1/flow/pin-risk/{symbol}
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
symbolstringUnderlying symbol
as_ofstringISO 8601 timestamp
underlying_pricenumberCurrent price of underlying
live_pin_risknumberComposite 0-100 pin risk score for the nearest expiry
magnet_strikenumberStrike with the largest absolute live net GEX
distance_to_magnet_pctnumber|spot - magnet| / spot (percent), to three decimal places
time_to_close_hoursnumberHours until nearest-expiry close (floored at 0.1)
breakdownobjectSub-scores that sum to live_pin_risk (see table below)

Breakdown Sub-Scores

Field Type Description
oi_scorenumberHow concentrated open interest is around the magnet strike. Higher when OI is stacked near spot
proximity_scorenumberHow close spot is to the magnet strike. Higher when distance_to_magnet_pct is small
time_scorenumberTime-decay weight. Higher as time_to_close_hours shrinks toward the nearest-expiry close
gamma_scorenumberMagnitude 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

  • 0DTE pin trades - size into a pin trade only when the live score crosses your threshold
  • Magnet-strike alerts - fire when the magnet jumps from one strike to another
  • Score decomposition - use the sub-scores to understand which factor (OI, proximity, time, gamma) is driving the pin probability
  • End-of-day timing - combine time_to_close_hours with the live score to detect the classic "last-hour pin" setup
  • Risk overlays - flag positions whose short strikes sit near a high-score magnet

Ready to build?

Get your free API key and start pulling live options data in 30 seconds.