You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Official JavaScript/TypeScript SDK for the FlashAlpha options analytics API.
Get a live options screener (filter/rank symbols by GEX, VRP, IV, greeks, harvest scores, and custom formulas), gamma exposure (GEX), delta exposure (DEX), vanna exposure (VEX), charm exposure (CHEX), implied volatility, volatility surface, 0DTE analytics, BSM greeks, Kelly criterion position sizing, and more — all from a single npm package.
Live 0DTE snapshot (flow-adjusted) + flow-direction read (opts.expiry). Requires Growth+
flowZeroDteSeries(symbol, opts?)
Intraday 0DTE flow series (levels, regime, hedge flow over time). Requires Growth+
flowZeroDteHedgeFlow(symbol, opts?)
Dealer hedge-flow series for the 0DTE expiry. Requires Growth+
flowZeroDteHeatmap(symbol, opts?)
Strike × time 0DTE heatmap (gex/dex/vex/chex/oi/signed_flow). Requires Alpha+
flowZeroDteStrikeFlow(symbol, opts?)
Per-strike signed 0DTE flow (delta/gamma dollars, contracts). Requires Alpha+
flowZeroDteLeaderboard(opts?)
Cross-symbol 0DTE leaderboard ranked by metric (heat/pin_risk/abs_flow/charm_intensity). Requires Alpha+
Strategy Signals
Each GETs /v1/strategies/{kind}/{symbol} and returns a shared
StrategyDecisionResponse (action, conviction, best matching multi-leg
structure with legs, risk flags, data quality).
Method
Description
strategyFlowAnomaly(symbol, opts?)
Directional options-flow imbalance + matching short vertical. Requires Growth+
Curated symbol directory (the queryable universe). Public
Reference Data
Method
Description
tickers()
All available stock tickers
options(ticker)
Option chain metadata (expirations and strikes)
symbols()
Currently queried symbols with live data
Max Pain
Method
Description
maxPain(symbol, options?)
Max pain analysis with dealer alignment, pain curve, OI breakdown, pin probability, multi-expiry calendar (Basic+)
Screener
Method
Description
screener(options)
Live options screener — filter/rank by GEX, VRP, IV, greeks, harvest scores, custom formulas (Growth+)
Account and System
Method
Description
screenerFields()
List the queryable screener fields and their types (any authenticated tier)
account()
Account info and quota
health()
Health check (public)
Futures (CME)
FlashAlpha serves the full options-analytics stack for CME futures across six complexes - equity index (ES=F, NQ=F, RTY=F, YM=F, MES=F, MNQ=F), metals (GC=F gold, SI=F silver), energy (CL=F crude oil, NG=F natural gas), the Treasury curve (ZT=F, ZF=F, ZN=F, TN=F, ZB=F, UB=F), grains (ZC=F corn, ZS=F soybeans, ZW=F wheat) and crypto (BTC=F bitcoin). Options-on-futures are priced with Black-76 (forward-priced) and each root carries its own CME contract multiplier, so notionals and dollar gamma are in real dollars. Note the quote conventions: Treasuries are quoted in points of par and grains in cents, so their multipliers are the contract size divided by 100. 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.
// Gamma exposure for the E-mini S&P 500 futureconstgex=awaitfa.gex('ES=F');console.log(gex);
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/GC%3DF); SDK methods take the plain string "GC=F". Futures symbols require the Growth plan or higher. Historical replay for futures is coming; live analytics are available now.
Method Options
gex / dex / vex / chex
awaitfa.gex('SPY',{expiration: '2024-12-20',// filter by expiration date (YYYY-MM-DD)minOi: 100,// minimum open interest filter (gex only)});
zeroDte
awaitfa.zeroDte('SPY',{strikeRange: 10,// number of strikes around ATM to include});
greeks
awaitfa.greeks({spot: 500,// underlying pricestrike: 500,// option strike pricedte: 30,// days to expirationsigma: 0.20,// implied volatility (annualized, e.g. 0.20 = 20%)type: 'call',// 'call' or 'put' (default: 'call')r: 0.05,// risk-free rate (optional)q: 0.01,// dividend yield (optional)});
iv
awaitfa.iv({spot: 500,strike: 500,dte: 30,price: 10.5,// market price of the optiontype: 'call',r: 0.05,// optionalq: 0.01,// optional});
kelly
awaitfa.kelly({spot: 500,strike: 500,dte: 30,sigma: 0.20,premium: 5.0,// option premium paidmu: 0.10,// expected drift of the underlying (annualized)type: 'call',r: 0.05,q: 0.01,});
Error Handling
All SDK methods throw typed errors. Catch them individually or catch the base FlashAlphaError.
import{FlashAlpha,AuthenticationError,TierRestrictedError,NotFoundError,RateLimitError,ServerError,FlashAlphaError,}from'flashalpha';constfa=newFlashAlpha('your-api-key');try{constdata=awaitfa.gex('SPY');}catch(err){if(errinstanceofAuthenticationError){console.error('Invalid API key — check your credentials.');}elseif(errinstanceofTierRestrictedError){console.error(`Upgrade required. Current: ${err.currentPlan}, Need: ${err.requiredPlan}`);}elseif(errinstanceofNotFoundError){console.error('Symbol not found or no data available.');}elseif(errinstanceofRateLimitError){constwait=err.retryAfter??60;console.error(`Rate limited. Retry after ${wait}s.`);}elseif(errinstanceofServerError){console.error(`Server error (${err.statusCode}): ${err.message}`);}elseif(errinstanceofFlashAlphaError){console.error(`API error (${err.statusCode}): ${err.message}`);}else{throwerr;// unexpected — rethrow}}
Configuration
constfa=newFlashAlpha('your-api-key',{baseUrl: 'https://lab.flashalpha.com',// default; override for testingtimeout: 30000,// milliseconds (default: 30000)});
TypeScript
The SDK is written in TypeScript and ships with full type declarations.
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 2017, 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.