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.
🔑 Get a free API key at flashalpha.com → · 📚 API documentation · 💹 FlashAlpha options analytics API
- Java 11 or later
- Maven 3.6+ or Gradle 7+
<dependency>
<groupId>com.flashalpha</groupId>
<artifactId>flashalpha</artifactId>
<version>0.3.7</version>
</dependency>implementation 'com.flashalpha:flashalpha:0.3.7'implementation("com.flashalpha:flashalpha:0.3.7")import com.flashalpha.FlashAlphaClient;
import com.google.gson.JsonObject;
public class Example {
public static void main(String[] args) {
FlashAlphaClient client = new FlashAlphaClient(System.getenv("FLASHALPHA_API_KEY"));
// Gamma exposure for SPY
JsonObject gex = client.gex("SPY");
System.out.println(gex);
// Live stock quote
JsonObject quote = client.stockQuote("AAPL");
System.out.println(quote.get("last").getAsDouble());
// Black-Scholes greeks
JsonObject greeks = client.greeks(450.0, 455.0, 5.0, 0.20, "call", null, null);
System.out.println(greeks);
// Implied volatility from market price
JsonObject iv = client.iv(450.0, 455.0, 5.0, 3.50, "call", null, null);
System.out.println(iv);
// Live options screener — harvestable VRP setups
java.util.Map<String, Object> filters = java.util.Map.of(
"op", "and",
"conditions", java.util.List.of(
java.util.Map.of("field", "regime", "operator", "eq", "value", "positive_gamma"),
java.util.Map.of("field", "harvest_score", "operator", "gte", "value", 65)
)
);
java.util.Map<String, Object> body = new java.util.LinkedHashMap<>();
body.put("filters", filters);
body.put("sort", java.util.List.of(java.util.Map.of("field", "harvest_score", "direction", "desc")));
body.put("select", java.util.List.of("symbol", "price", "harvest_score", "dealer_flow_risk"));
JsonObject screen = client.screener(body);
System.out.println(screen);
}
}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.
All errors extend FlashAlphaException (a RuntimeException). Catch the specific
subclass you care about:
import com.flashalpha.*;
try {
JsonObject gex = client.gex("SPY");
} catch (AuthenticationException e) {
// HTTP 401 — invalid or missing API key
System.err.println("Bad key: " + e.getMessage());
} catch (TierRestrictedException e) {
// HTTP 403 — endpoint requires a higher plan
System.err.printf("Need %s, have %s%n", e.getRequiredPlan(), e.getCurrentPlan());
} catch (NotFoundException e) {
// HTTP 404 — symbol or resource not found
} catch (RateLimitException e) {
// HTTP 429 — slow down; retry after e.getRetryAfter() seconds
Thread.sleep(e.getRetryAfter() * 1000L);
} catch (ServerException e) {
// HTTP 5xx — server-side error
} catch (FlashAlphaException e) {
// Catch-all for any other API error
System.err.println("Status " + e.getStatusCode() + ": " + e.getMessage());
}All methods return com.google.gson.JsonObject.
| 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 |
stockSummary(symbol) |
Comprehensive stock summary | Any |
| 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+ |
| 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+ |
maxPain(symbol) |
Max pain analysis with dealer alignment, pain curve, pin probability | Growth+ |
maxPain(symbol, expiration) |
Max pain for a single expiry | Growth+ |
Each method has a strongly-typed *Typed variant (e.g. flowLevelsTyped).
| Method | Description |
|---|---|
flowLevels(symbol[, expiry]) |
Live gamma flip / call & put walls / max pain |
flowPinRisk(symbol[, expiry]) |
0DTE pin-risk score + component breakdown |
flowSummary(symbol[, expiry]) |
At-a-glance flow direction + headline GEX shift |
flowOi(symbol[, expiry]) |
Open-interest simulator state (official vs intraday) |
flowGex(symbol[, expiry]) |
Live (flow-adjusted) GEX + per-strike profile |
flowDex(symbol[, expiry]) |
Live (flow-adjusted) DEX + per-strike profile |
flowDealerRisk(symbol[, expiry]) |
Settled-vs-live dealer GEX/DEX + flow adjustment |
flowLive(symbol[, expiry]) |
Everything-at-once live flow bundle |
flowSignals(symbol, minScore, intent, structure, windowMinutes, limit, expiry) |
Scored, classified unusual-flow feed (block/sweep, intent, 0-100 score) |
flowSignalsSummary(symbol, windowMinutes, expiry) |
Net bullish/bearish + opening/closing premium roll-up + top 10 signals |
flowOptionRecent(symbol, limit, expiry) |
Recent option trades, newest-first |
flowOptionSummary(symbol, expiry) |
Per-underlying option-flow aggregates |
flowOptionBlocks(symbol, minSize, expiry) |
Large option prints (size >= minSize) |
flowOptionHistory(symbol, minutes, expiry) |
Per-minute option-flow buckets |
flowOptionCumulative(symbol, minutes, expiry) |
Cumulative option net-flow series |
flowStockRecent(symbol, limit) |
Recent stock trades, newest-first |
flowStockSummary(symbol) |
Per-symbol stock-flow aggregates |
flowStockBlocks(symbol, minSize) |
Large stock prints (size >= minSize) |
flowStockHistory(symbol, minutes) |
Per-minute stock-flow buckets w/ OHLC |
flowStockCumulative(symbol, minutes) |
Cumulative stock net-flow series |
flowOptionsLeaderboard(n, windowMinutes) |
Cross-symbol option-flow leaderboard |
flowOptionsOutliers(limit, minTrades, windowMinutes) |
Cross-symbol option-flow outliers |
flowStocksLeaderboard(n, windowMinutes) |
Cross-symbol stock-flow leaderboard |
flowStocksOutliers(limit, minTrades, windowMinutes) |
Cross-symbol stock-flow outliers |
| Method | Description | Plan |
|---|---|---|
greeks(spot, strike, dte, sigma, type, r, q) |
Full BSM greeks (1st/2nd/3rd order) | Any |
iv(spot, strike, dte, price, type, r, q) |
Implied volatility from market price | Any |
kelly(spot, strike, dte, sigma, premium, mu, type, r, q) |
Kelly criterion position sizing | Growth+ |
| Method | Description | Plan |
|---|---|---|
volatility(symbol) |
Term structure, skew, realized vs implied | Growth+ |
advVolatility(symbol) |
SVI, variance surface, arbitrage detection | Alpha+ |
| 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 |
| Method | Description | Plan |
|---|---|---|
account() |
Account info and quota usage | Any |
health() |
API health check | Public |
# 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 testgit clone https://github.com/FlashAlpha-lab/flashalpha-java.git
cd flashalpha-java
mvn packageMIT. See LICENSE.
| Language | Package | Repository |
|---|---|---|
| Python | pip install flashalpha |
flashalpha-python |
| JavaScript | npm i flashalpha |
flashalpha-js |
| .NET | dotnet add package FlashAlpha |
flashalpha-dotnet |
| Go | go get github.com/FlashAlpha-lab/flashalpha-go |
flashalpha-go |
| MCP | Claude / LLM tool server | flashalpha-mcp |
- FlashAlpha — API keys, docs, pricing
- API Documentation
- Examples — runnable tutorials
- GEX Explained — gamma exposure theory and code
- 0DTE Options Analytics — 0DTE pin risk, expected move, dealer hedging
- Volatility Surface Python — SVI calibration, variance swap, skew analysis
- Awesome Options Analytics — curated resource list
Free and entry tiers cover live exposure analytics. The Alpha tier ($1,499/mo) adds the data you cannot get anywhere else:
- Aggregate vanna and charm exposure. FlashAlpha is the only public source for these dealer-positioning aggregates.
- Point-in-time replay since 2018. Backtest and trade the same code, with no look-ahead and no training-serving skew.
- SVI vol surfaces, VRP analytics, higher-order Greeks, uncached and unlimited.
Built for quants, prop desks, and vol funds. See the full picture and get a key: flashalpha.com/for-quant-teams