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.
Every successful JSON-object response carries data_as_of, reporting when each upstream
feed last delivered to the node that answered, plus endpoint_version identifying the
deployment that produced it. That is every method on this client except the handful that
return a bare JSON array - see the note at the end of this section.
DataAsOf is exported from the package root, so the object is typed rather than an
untyped passthrough:
importtype{DataAsOf}from'flashalpha';
Field
Feed
Expected cadence
node
Which node answered
Nodes hydrate independently
equity_feed
Equity and ETF spot quotes
seconds, during market hours
equity_options_feed
Equity and ETF option quotes
seconds, during market hours
index_feed
Index spot (SPX, RUT, VIX and the other index roots)
seconds, during market hours
index_options_feed
Index option quotes
seconds, during market hours
futures_feed
Futures prices
seconds, during the futures session
futures_options_feed
Futures option quotes
seconds, during the futures session
flow_feed
Classified options and stock trade tape
seconds, during market hours
oi_feed
Settled open interest
daily, dated to the prior 16:00 ET close
macro_feed
VIX, VVIX, SKEW, MOVE, SPX, Fear & Greed
minutes; reports its OLDEST component
How to read it
Check the feeds your call depends on. A GEX call on an equity is answered from
equity_feed, equity_options_feed and oi_feed. futures_feed being null in that
response says nothing about the answer.
Compare against the cadence, not the clock.oi_feed at the previous session's
close is correct: settled open interest is published once per session, so on a Monday
the newest figure that exists is Friday's. An options feed an hour behind during the
regular session is not correct.
null means "not seen on this node", not "broken". A node that has never been
asked for a futures symbol has never opened that feed.
Spot and options are separate on purpose. They arrive over different pipes and can
fail independently.
It evidences feed activity, not per-contract freshness. An illiquid strike may not
have quoted for hours while its feed is healthy.
data_as_of is not as_of.as_of is response-generation time or the newest
contract in the payload, depending on the endpoint. data_as_of describes the feeds
behind it.
Bare-array endpoints
A few endpoints return a bare JSON array, which has nowhere to put an envelope in the
body. The API sends the same information in the X-Data-As-Of and X-Endpoint-Version
response headers instead - but this client returns the parsed body only and does not
surface response headers, so the envelope is not reachable through those methods.
Call the HTTP endpoint directly if you need provenance for one of them.
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.