Flow Pin Risk API - 0DTE Pin Score Breakdown | FlashAlpha
  1. 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 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.
Works with CME 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 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.

GET

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
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)
expirystring | nullThe expiry filter from the request, null when it was omitted
endpoint_version, data_as_ofstring, objectResponse envelope, see Response envelope.

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

Errors

Status Error When
400invalid_expiryexpiry 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.
403tier_restrictedYour plan is below Growth. The body includes current_plan and required_plan.
404no_dataNo data for the symbol.
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.

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 - read oi_score, proximity_score, time_score, and gamma_score to 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_hours with a rising time_score to 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_strike so you can hedge assignment/pin risk into expiry

Related reading

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 with FlashAlpha?

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

No credit card required Setup in 60 seconds Secure & reliable