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
Java client library for the FlashAlpha options analytics API.
Provides a live options screener (filter/rank symbols by GEX, VRP, IV, greeks, harvest
scores, and custom formulas), real-time gamma exposure (GEX), delta exposure (DEX), vanna
exposure (VEX), charm exposure (CHEX), 0DTE analytics, volatility surface, implied
volatility, Black-Scholes greeks, Kelly criterion position sizing, stock quotes, and option
chain data — all from a single, dependency-light Java 11+ package.
All endpoints (except /health and /v1/surface/{symbol}) require an API key, which
is passed in the X-Api-Key HTTP request header. Obtain your key at
flashalpha.com.
Set it as an environment variable and read it at runtime — never hard-code secrets in
source files.
Error handling
All errors extend FlashAlphaException (a RuntimeException). Catch the specific
subclass you care about:
importcom.flashalpha.*;
try {
JsonObjectgex = client.gex("SPY");
} catch (AuthenticationExceptione) {
// HTTP 401 — invalid or missing API keySystem.err.println("Bad key: " + e.getMessage());
} catch (TierRestrictedExceptione) {
// HTTP 403 — endpoint requires a higher planSystem.err.printf("Need %s, have %s%n", e.getRequiredPlan(), e.getCurrentPlan());
} catch (NotFoundExceptione) {
// HTTP 404 — symbol or resource not found
} catch (RateLimitExceptione) {
// HTTP 429 — slow down; retry after e.getRetryAfter() secondsThread.sleep(e.getRetryAfter() * 1000L);
} catch (ServerExceptione) {
// HTTP 5xx — server-side error
} catch (FlashAlphaExceptione) {
// Catch-all for any other API errorSystem.err.println("Status " + e.getStatusCode() + ": " + e.getMessage());
}
API methods
All methods return com.google.gson.JsonObject.
Market data
Method
Description
Plan
stockQuote(ticker)
Live stock quote (bid/ask/mid/last)
Any
optionQuote(ticker)
Option quotes with greeks for all contracts
Growth+
optionQuote(ticker, expiry, strike, type)
Filtered option quotes
Growth+
surface(symbol)
Volatility surface grid
Public
surfaceSvi(symbol)
SVI-fitted vol surface — calibrated (a, b, rho, m, sigma) params, per-expiry forward, ATM total variance and ATM IV
Alpha+
stockSummary(symbol)
Comprehensive stock summary
Any
Historical data
Method
Description
Plan
historicalStockQuote(ticker, date, time)
Minute-by-minute historical stock quotes
Any
historicalOptionQuote(ticker, date, time, expiry, strike, type)
Historical option quotes
Growth+
Exposure analytics
Method
Description
Plan
gex(symbol)
Gamma exposure by strike
Any
gex(symbol, expiration, minOi)
Gamma exposure with filters
Any
dex(symbol)
Delta exposure by strike
Any
dex(symbol, expiration)
Delta exposure filtered by expiration
Any
vex(symbol)
Vanna exposure by strike
Any
vex(symbol, expiration)
Vanna exposure filtered by expiration
Any
chex(symbol)
Charm exposure by strike
Any
chex(symbol, expiration)
Charm exposure filtered by expiration
Any
exposureLevels(symbol)
Key support/resistance levels
Any
exposureSummary(symbol)
Full GEX/DEX/VEX/CHEX + hedging summary
Growth+
narrative(symbol)
Verbal narrative analysis of exposure
Growth+
zeroDte(symbol)
Real-time 0DTE analytics
Growth+
zeroDte(symbol, strikeRange)
0DTE analytics with custom strike range
Growth+
zeroDte(symbol, strikeRange, expiry)
0DTE analytics for a specific expiry
Growth+
maxPain(symbol)
Max pain analysis with dealer alignment, pain curve, pin probability
Ten decision-grade strategy signals sharing the StrategyDecisionResponse envelope (recommendation, conviction, rationale, suggested structure). Each has a *Typed variant.
POST endpoints — no symbol resolution; supply legs via StructureRequest / StructureGreeksRequest (StructureLeg.pnlLeg(...) / StructureLeg.greeksLeg(...)).
Method
Description
Plan
structurePnl(request)
At-expiry P&L curve, breakevens, max profit/loss for an arbitrary multi-leg structure
Basic+
structureGreeks(request)
Aggregate Black-Scholes greeks across a multi-leg position (per-leg expiry + IV)
Basic+
Zero-DTE flow
Method
Description
Plan
flowZeroDteSnapshot(symbol)
Intraday 0DTE flow snapshot + net flow_direction
Growth+
flowZeroDteSeries(symbol[, bar, minutes])
Intraday 0DTE bucketed-flow time series
Growth+
flowZeroDteHedgeFlow(symbol[, side, bar, minutes])
Intraday 0DTE dealer hedge-flow series
Growth+
flowZeroDteHeatmap(symbol[, metric, mode, bar, minutes])
Intraday 0DTE strike × time heatmap
Alpha+
flowZeroDteStrikeFlow(symbol[, bar, minutes])
Intraday 0DTE per-strike flow
Growth+
Macro and universe
Method
Description
Plan
vixState()
Composite VIX-state read (level, regime, term structure)
Growth+
universe([sort, limit])
Curated tier-1 / tier-2 symbol directory (pre-warmed universe)
Public
Screener
Method
Description
Plan
screener(body)
Live options screener — filter / rank symbols by GEX, VRP, IV, greeks, harvest scores, and custom formulas
Growth+
v1.1 adds screenable fields covering the new analytics: expected_move, liquidity_score, skew_25d, risk_reversal_25d, butterfly_25d, tail_convexity, spot_vol_corr, oi_diff_call, oi_diff_put, vix_state, plus the per-strike exposure_sheet columns — combinable with existing regime, harvest_score, dealer_flow_risk, vrp_regime, atm_iv, net_gex, and term_state fields.
Reference data
Method
Description
Plan
tickers()
All available stock tickers
Any
options(ticker)
Option chain metadata (expirations + strikes)
Any
symbols()
Currently queried symbols with live data
Any
Account and system
Method
Description
Plan
account()
Account info and quota usage
Any
health()
API health check
Public
Running tests
# Unit tests only (no API key required)
mvn test -Dtest=ClientTest
# Integration tests (requires live API key)export FLASHALPHA_API_KEY=your_key_here
mvn test -Dtest=IntegrationTest
# All tests
mvn test
Building from source
git clone https://github.com/FlashAlpha-lab/flashalpha-java.git
cd flashalpha-java
mvn package