FlashAlpha Python SDK

June 16, 2026 ยท View on GitHub

PyPI Python License: MIT CI

Python client for the FlashAlpha options analytics API. Access a live options screener (filter/rank symbols by gamma exposure, VRP, IV, greeks, harvest scores, and custom formulas), real-time gamma exposure (GEX), delta exposure (DEX), vanna exposure (VEX), charm exposure (CHEX), 0DTE analytics, Black-Scholes greeks, implied volatility, volatility surfaces, dealer positioning, Kelly criterion sizing, and more โ€” all from Python.

๐Ÿ”‘ Get a free API key at flashalpha.com โ†’ ยท ๐Ÿ“š API documentation ยท ๐Ÿ’น FlashAlpha options analytics API

pip install flashalpha

Quick Start

from flashalpha import FlashAlpha

fa = FlashAlpha("YOUR_API_KEY")  # Get a free key at flashalpha.com

# Gamma exposure by strike
gex = fa.gex("SPY")
print(f"Net GEX: ${gex['net_gex']:,.0f}")
print(f"Gamma flip: {gex['gamma_flip']}")

for strike in gex["strikes"][:5]:
    print(f"  {strike['strike']}: net ${strike['net_gex']:,.0f}")

Get your free API key at flashalpha.com โ€” no credit card required.

Features

Live Options Screener

Filter and rank symbols in real time across your universe by gamma exposure, VRP, implied volatility, greeks, harvest scores, dealer flow risk, and custom formulas. Data is live from an in-memory store refreshed every 5-10 seconds.

# Harvestable VRP setups with low dealer flow risk
result = fa.screener(
    filters={
        "op": "and",
        "conditions": [
            {"field": "regime", "operator": "eq", "value": "positive_gamma"},
            {"field": "vrp_regime", "operator": "eq", "value": "harvestable"},
            {"field": "dealer_flow_risk", "operator": "lte", "value": 40},
            {"field": "harvest_score", "operator": "gte", "value": 65},
        ],
    },
    sort=[{"field": "harvest_score", "direction": "desc"}],
    select=["symbol", "price", "harvest_score", "dealer_flow_risk"],
)
for row in result["data"]:
    print(f"{row['symbol']}: score={row['harvest_score']} risk={row['dealer_flow_risk']}")

# Custom formula โ€” rank by IV premium over realized vol
result = fa.screener(
    formulas=[{"alias": "iv_premium", "expression": "atm_iv - rv_20d"}],
    sort=[{"formula": "iv_premium", "direction": "desc"}],
    select=["symbol", "atm_iv", "rv_20d", "iv_premium"],
    limit=20,
)

Cascading filters on expiries, strikes, and contracts (e.g. expiries.days_to_expiry, strikes.call_oi, contracts.delta) trim the tree at each level and return only the matching subtree. See the Screener spec and cookbook for all fields, operators, and recipes.

Options Exposure Analytics

Gamma exposure, delta exposure, vanna exposure, and charm exposure by strike. See where dealers are positioned and how they need to hedge.

gex = fa.gex("SPY")                                        # Gamma exposure
dex = fa.dex("AAPL")                                       # Delta exposure
vex = fa.vex("QQQ")                                        # Vanna exposure
chex = fa.chex("NVDA")                                     # Charm exposure

levels = fa.exposure_levels("SPY")                          # Key levels
print(f"Call wall: {levels['levels']['call_wall']}")
print(f"Put wall: {levels['levels']['put_wall']}")
print(f"Gamma flip: {levels['levels']['gamma_flip']}")

summary = fa.exposure_summary("SPY")                        # Full summary (Growth+)
narrative = fa.narrative("SPY")                              # AI narrative (Growth+)
print(narrative["narrative"]["outlook"])

0DTE Analytics

Real-time zero-days-to-expiration analysis: gamma regime, expected move, pin risk scoring, dealer hedging estimates, theta decay acceleration, and per-strike breakdown.

dte = fa.zero_dte("SPY")                                    # Growth+
print(f"Pin score: {dte['pin_risk']['pin_score']}/100")
print(f"Expected move: ยฑ{dte['expected_move']['remaining_1sd_pct']:.2f}%")
print(f"Theta/hr: ${dte['decay']['theta_per_hour_remaining']:,.0f}")
print(f"Gamma acceleration: {dte['decay']['gamma_acceleration']}x vs 7DTE")

Black-Scholes Greeks and Implied Volatility

Full BSM greeks โ€” first order (delta, gamma, theta, vega, rho), second order (vanna, charm, vomma), and third order (speed, zomma, color, ultima).

g = fa.greeks(spot=580, strike=580, dte=30, sigma=0.18, type="call")
print(f"Delta: {g['first_order']['delta']}")
print(f"Vanna: {g['second_order']['vanna']}")
print(f"Speed: {g['third_order']['speed']}")

iv = fa.iv(spot=580, strike=580, dte=30, price=12.69)
print(f"IV: {iv['implied_volatility_pct']}%")

Volatility Analytics

Realized vol, IV-RV spreads, skew profiles, term structure, GEX by DTE, theta decay, put/call breakdowns, OI concentration, hedging scenarios, and liquidity analysis.

vol = fa.volatility("TSLA")                                 # Growth+
print(f"ATM IV: {vol['atm_iv']}%")
print(f"RV 20d: {vol['realized_vol']['rv_20d']}%")
print(f"VRP: {vol['iv_rv_spreads']['assessment']}")
print(f"Skew 25d: {vol['skew_profiles'][0]['skew_25d']}")

Advanced Volatility (SVI, Variance Surfaces, Arbitrage Detection)

Raw SVI parameters per expiry, total variance surface grids, butterfly and calendar arbitrage flags, higher-order greeks surfaces (vanna, charm, volga, speed), and variance swap fair values.

adv = fa.adv_volatility("SPY")                              # Alpha+
print(f"SVI params: {adv['svi_parameters'][0]}")
print(f"Arbitrage flags: {len(adv['arbitrage_flags'])}")
print(f"Var swap fair vol: {adv['variance_swap_fair_values'][0]['fair_vol']}%")

Strategy Signals (decision envelope)

Ten decision-support endpoints that score a single trading idea 0-100, classify a regime, and return ranked tradeable structures (legs, credit/debit, breakevens) in one uniform StrategyDecisionResponse: flow anomaly, expiry positioning, 0DTE range compression, dealer gamma regime, vol-carry (VRP), yield enhancement (covered call / cash-secured put), surface anomaly, skew, term structure, and tail pricing.

carry = fa.strategy_vol_carry("SPY", target_short_delta=0.20)  # Alpha+
print(carry["decision"], carry["score"], carry["regime"])
for s in carry["best_structures"]:
    print(s["structure"], s["expiry"], s.get("credit"))

Earnings Analytics

Earnings calendar, implied-move decomposition (earnings jump vs baseline diffusion), historical earnings surprises and realized moves, expected IV crush and its historical distribution, earnings VRP richness, dealer positioning into the event, strategy-suitability scores, and a cross-sectional earnings screener.

em = fa.earnings_expected_move("AAPL")                          # Growth+
print(em["earnings_date"], em.get("implied_move_pct"))
events = fa.earnings_screener(sort="vrp_richest", days=14)      # Alpha+

Multi-Leg Structures (pure math)

Deterministic at-expiry P&L diagrams, breakevens, and aggregate Black-Scholes greeks for arbitrary multi-leg option structures โ€” no market-data lookup, you supply the legs.

pnl = fa.structure_pnl(                                         # Basic+
    legs=[
        {"action": "buy",  "type": "call", "strike": 100, "premium": 3.20},
        {"action": "sell", "type": "call", "strike": 110, "premium": 1.10},
    ],
)
print(pnl["max_profit"], pnl["max_loss"], pnl["breakevens"])

Zero-DTE Flow, Dispersion & Macro

Intraday simulation-aware 0DTE flow (snapshot, series, dealer hedge-flow, per-strike heatmap and strike-flow), full-tape Net Dealer Premium, multi-resolution OHLCV+flow bars, implied-vs-realized correlation for dispersion / vol-arb, VIX-state over/under-vixing regime, liquidity scores, skew term structure, spot-vol correlation, expected move, VRP history, and the curated symbol universe.

snap = fa.flow_zero_dte_snapshot("SPY")                         # Growth+
disp = fa.dispersion(index="SPX", symbols=["AAPL", "MSFT", "NVDA"])  # Alpha+
vix = fa.vix_state()                                            # Growth+

Kelly Criterion Position Sizing

Optimal position sizing using numerical integration over the full lognormal distribution โ€” not the simplified gambling formula.

kelly = fa.kelly(                                            # Growth+
    spot=580, strike=580, dte=30,
    sigma=0.18, premium=12.69, mu=0.12,
)
print(kelly["recommendation"])
print(f"Half-Kelly: {kelly['sizing']['half_kelly_pct']}%")

Market Data

quote = fa.stock_quote("AAPL")                              # Live stock quote
opt = fa.option_quote("SPY", expiry="2026-03-21",           # Option quote (Growth+)
                       strike=660, type="C")
summary = fa.stock_summary("SPY")                           # Comprehensive summary
surface = fa.surface("SPY")                                  # Vol surface (public)

Historical Data (QuestDB)

Minute-by-minute stock and option quotes from QuestDB โ€” 3.5 billion rows across 141 tickers.

hist = fa.historical_stock_quote("SPY", date="2026-03-05", time="10:30")
hist_opt = fa.historical_option_quote(
    "SPY", date="2026-03-05", expiry="2026-03-20", strike=580, type="C"
)

Reference Data and Account

tickers = fa.tickers()                # All available stock tickers
chain = fa.options("SPY")             # Option chain metadata
symbols = fa.symbols()                # Symbols with live cached data
account = fa.account()                # Plan, usage, quota
health = fa.health()                  # API health check (public)

Error Handling

from flashalpha import (
    FlashAlpha,
    AuthenticationError,
    TierRestrictedError,
    NotFoundError,
    RateLimitError,
)

fa = FlashAlpha("YOUR_API_KEY")

try:
    data = fa.exposure_summary("SPY")
except AuthenticationError:
    print("Invalid API key")
except TierRestrictedError as e:
    print(f"Need {e.required_plan} plan (you have {e.current_plan})")
except NotFoundError:
    print("Symbol not found")
except RateLimitError as e:
    print(f"Rate limited โ€” retry after {e.retry_after}s")

API Plans

PlanDaily RequestsAccess
Free5Stock quotes, single-expiry GEX (equities), key levels, BSM greeks, IV, IV surface, stock summary, historical quotes, tickers, options meta
Basic100+ DEX/VEX/CHEX by strike, max pain, ETF & index symbols (SPX, VIX, RUT, etc.)
Growth2,500+ Exposure summary, narrative, 0DTE analytics, volatility analytics, option quotes, full-chain GEX, Kelly sizing
AlphaUnlimited+ Advanced volatility (SVI, variance surfaces, arbitrage detection, greeks surfaces, variance swap)

Get your API key at flashalpha.com

All Methods

MethodEndpointPlan
fa.gex(symbol)Gamma exposure by strikeFree+
fa.dex(symbol)Delta exposure by strikeBasic+
fa.vex(symbol)Vanna exposure by strikeBasic+
fa.chex(symbol)Charm exposure by strikeBasic+
fa.exposure_levels(symbol)Key levels (gamma flip, walls, max pain)Free+
fa.exposure_summary(symbol)Full exposure summary with hedgingGrowth+
fa.narrative(symbol)AI narrative analysisGrowth+
fa.zero_dte(symbol)0DTE analytics (regime, pin risk, decay)Growth+
fa.stock_quote(ticker)Live stock quoteFree+
fa.option_quote(ticker)Option quotes with greeksGrowth+
fa.stock_summary(symbol)Comprehensive stock summaryPublic/Free+
fa.surface(symbol)Volatility surface gridPublic
fa.historical_stock_quote(ticker)Historical stock quotesFree+
fa.historical_option_quote(ticker)Historical option quotesFree+
fa.greeks(...)BSM greeks (1st, 2nd, 3rd order)Free+
fa.iv(...)Implied volatility solverFree+
fa.kelly(...)Kelly criterion sizingGrowth+
fa.max_pain(symbol)Max pain analysis with dealer alignment, pain curve, pin probabilityBasic+
fa.screener(...)Live options screener โ€” filter/rank by GEX, VRP, IV, greeks, formulasGrowth+
fa.volatility(symbol)Comprehensive volatility analyticsGrowth+
fa.adv_volatility(symbol)SVI, variance surface, arb detectionAlpha+
fa.tickers()All available stock tickersFree+
fa.options(ticker)Option chain metadataFree+
fa.symbols()Symbols with live dataFree+
fa.account()Account info and quotaFree+
fa.health()Health checkPublic
fa.surface_svi(symbol)Live SVI surface params per expiry sliceAlpha+
fa.exposure_sheet(symbol)Unified per-strike GEX/DEX/VEX/CHEX/DAG + Line-in-the-Sand + peaksGrowth+
fa.exposure_term_structure(symbol)Exposure aggregated by DTE bucket and expiryGrowth+
fa.exposure_basket(symbols)Weighted cross-symbol exposure aggregateGrowth+
fa.exposure_oi_diff(symbol)Day-over-day open-interest deltas, top-NGrowth+
fa.liquidity(symbol)Per-expiry execution score and bid-ask spreadsGrowth+
fa.skew_term(symbol)25-delta skew and risk-reversal term structureGrowth+
fa.spot_vol_correlation(symbol)Spot-vol correlation (20d/60d)Growth+
fa.dispersion(index, symbols, ...)Implied-vs-realized correlation / dispersion vol-arbAlpha+
fa.expected_move(symbol)Straddle-implied expected move per expiryBasic+
fa.realized_volatility(symbol)Range-based realized vol estimators (10d/20d/30d)Alpha+
fa.volatility_forecast(symbol, dist=...)Conditional vol forecasts (EWMA / HAR-RV / GARCH)Alpha+
fa.vrp_history(symbol)Daily VRP time series for charting/backtestingAlpha+
fa.vix_state()Over/under-vixing regime (VIX vs SPX realized vol)Growth+
fa.universe(...)Curated tier-1/tier-2 symbol directoryPublic
fa.screener_fields()List screener-referenceable fields and typesFree+
fa.flow_dealer_premium(symbol)Full-tape Net Dealer Premium roll-upAlpha+
fa.flow_stock_bars(symbol, resolution=...)Multi-resolution OHLCV+flow barsAlpha+
fa.flow_zero_dte_snapshot(symbol)Live intraday 0DTE shape + flow directionGrowth+
fa.flow_zero_dte_series(symbol)Intraday 0DTE metric time seriesGrowth+
fa.flow_zero_dte_hedge_flow(symbol)Dealer hedge-flow time series (0DTE)Growth+
fa.flow_zero_dte_heatmap(symbol)Per-strike 0DTE intraday heatmapAlpha+
fa.flow_zero_dte_strike_flow(symbol)Per-strike signed aggressor 0DTE flowAlpha+
fa.flow_zero_dte_leaderboard()Cross-symbol 0DTE leaderboardAlpha+
fa.strategy_flow_anomaly(symbol)Strategy signal: directional flow imbalanceGrowth+
fa.strategy_expiry_positioning(symbol)Strategy signal: OPEX pin / iron flyBasic+
fa.strategy_zero_dte(symbol)Strategy signal: same-day 0DTE range compressionGrowth+ (+0DTE)
fa.strategy_dealer_regime(symbol)Strategy signal: dealer gamma regimeGrowth+
fa.strategy_vol_carry(symbol)Strategy signal: VRP carry / short volAlpha+
fa.strategy_yield_enhancement(symbol)Strategy signal: covered call / cash-secured putGrowth+
fa.strategy_surface_anomaly(symbol)Strategy signal: rich/cheap wings vs SVI fitAlpha+
fa.strategy_skew(symbol)Strategy signal: skew richnessGrowth+
fa.strategy_term_structure(symbol)Strategy signal: IV term-structure slopeGrowth+
fa.strategy_tail_pricing(symbol)Strategy signal: tail (deep-wing) pricingGrowth+
fa.earnings_calendar(...)Upcoming earnings calendarGrowth+
fa.earnings_expected_move(symbol)Earnings implied-move decompositionGrowth+
fa.earnings_history(symbol)Past earnings: surprises, moves, IV crushGrowth+
fa.earnings_iv_crush(symbol)Expected IV crush + historical distributionGrowth+
fa.earnings_vrp(symbol)Earnings VRP richness assessmentAlpha+
fa.earnings_dealer_positioning(symbol)Dealer positioning into the earnings eventAlpha+
fa.earnings_strategies(symbol)Earnings strategy-suitability scoresAlpha+
fa.earnings_screener(...)Cross-sectional earnings screenerAlpha+
fa.structure_pnl(legs, ...)Multi-leg at-expiry P&L, breakevens, max P/LBasic+
fa.structure_greeks(legs, spot=...)Aggregate multi-leg Black-Scholes greeksBasic+

Futures (CME equity-index)

FlashAlpha serves the full options-analytics stack for CME equity-index futures โ€” ES=F (E-mini S&P 500) and NQ=F (E-mini Nasdaq-100). Options-on-futures are priced with Black-76 (forward-priced) using the correct CME contract multipliers. Everything that works for an equity works for futures: gamma exposure (GEX), DEX, VEX, CHEX, key levels, max pain, the IV surface, exposure summary, narrative, and live flow.

gex = fa.gex("ES=F")                                        # Gamma exposure for the E-mini S&P 500 future
print(f"Net GEX: ${gex['net_gex']:,.0f}")

Use the =F suffix โ€” bare ES/NQ are equities, not futures. In raw REST paths URL-encode the = as %3D (e.g. GET /v1/exposure/gex/ES%3DF); SDK methods take the plain string "ES=F". Historical replay for futures is coming; live analytics are available now.

Other SDKs

LanguagePackageRepository
JavaScriptnpm i flashalphaflashalpha-js
.NETdotnet add package FlashAlphaflashalpha-dotnet
JavaMaven Centralflashalpha-java
Gogo get github.com/FlashAlpha-lab/flashalpha-goflashalpha-go
MCPClaude / LLM tool serverflashalpha-mcp

License

MIT

What the paid tiers unlock

The free tier covers single-expiry GEX on equities, key levels, the BSM Greeks/IV calculator and stock quotes. Paid tiers add:

  • DEX, VEX (vanna) and CHEX (charm) exposure, plus max pain โ€” from the Basic tier ($79/mo), with ETF and index symbols.
  • Full-chain GEX, 0DTE and flow analytics โ€” from the Growth tier ($299/mo).
  • Point-in-time replay since 2018, SVI vol surfaces, VRP analytics, higher-order Greeks, uncached and unlimited โ€” the Alpha tier ($1,499/mo). FlashAlpha is one of the only public APIs publishing aggregate vanna and charm exposure across the full universe, with no look-ahead and no training-serving skew.

Built for quants, prop desks, and vol funds. See the full picture and get a key: flashalpha.com/for-quant-teams