FlashAlpha .NET SDK

June 16, 2026 ยท View on GitHub

Official .NET / C# client for the FlashAlpha options analytics API.

Access 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, Black-Scholes greeks, Kelly criterion position sizing, and more โ€” for SPX, SPY, QQQ, AAPL, and all major US equities.

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

Installation

dotnet add package FlashAlpha

Target framework: .NET 8.0+. No external dependencies โ€” uses System.Net.Http and System.Text.Json.

Quick start

using FlashAlpha;

var client = new FlashAlphaClient("YOUR_API_KEY");

// Gamma exposure for SPY
var gex = await client.GexAsync("SPY");
Console.WriteLine(gex);

// Black-Scholes greeks
var greeks = await client.GreeksAsync(spot: 500, strike: 505, dte: 30, sigma: 0.20, type: "call");
Console.WriteLine(greeks);

// Health check (no API key required)
var health = await client.HealthAsync();

// Live options screener โ€” harvestable VRP setups
var screenResult = await client.ScreenerAsync(new ScreenerRequest
{
    Filters = new ScreenerGroup
    {
        Op = "and",
        Conditions = new List<object>
        {
            new ScreenerLeaf { Field = "regime", Operator = "eq", Value = "positive_gamma" },
            new ScreenerLeaf { Field = "harvest_score", Operator = "gte", Value = 65 },
        },
    },
    Sort = new List<ScreenerSort> { new() { Field = "harvest_score", Direction = "desc" } },
    Select = new List<string> { "symbol", "price", "harvest_score", "dealer_flow_risk" },
});

Constructor

var client = new FlashAlphaClient(
    apiKey: "YOUR_API_KEY",   // required
    baseUrl: null,            // optional: override API base URL
    timeout: 30               // optional: request timeout in seconds
);

The client implements IDisposable. Use using or call Dispose() when finished.

All methods

All methods return Task<JsonElement> and accept an optional CancellationToken.

Market Data

MethodDescriptionPlan
StockQuoteAsync(ticker)Live stock quote (bid/ask/mid/last)Free
OptionQuoteAsync(ticker, expiry?, strike?, type?)Option quotes with greeksGrowth+
SurfaceAsync(symbol)Volatility surface gridFree
SurfaceSviAsync(symbol)Calibrated SVI surface parameters per expiry sliceAlpha+
StockSummaryAsync(symbol)Comprehensive stock summary (price, vol, exposure, macro)Free

Historical Data

MethodDescriptionPlan
HistoricalStockQuoteAsync(ticker, date, time?)Historical stock quotes (minute resolution)Growth+
HistoricalOptionQuoteAsync(ticker, date, time?, expiry?, strike?, type?)Historical option quotes (minute resolution)Growth+

Exposure Analytics

MethodDescriptionPlan
GexAsync(symbol, expiration?, minOi?)Gamma exposure by strikeFree
DexAsync(symbol, expiration?)Delta exposure by strikeBasic
VexAsync(symbol, expiration?)Vanna exposure by strikeBasic
ChexAsync(symbol, expiration?)Charm exposure by strikeBasic
ExposureLevelsAsync(symbol)Key support/resistance levels from options exposureFree
ExposureSummaryAsync(symbol)Full GEX/DEX/VEX/CHEX summary + hedging pressureGrowth+
NarrativeAsync(symbol)AI-generated verbal narrative of exposureGrowth+
ZeroDteAsync(symbol, strikeRange?, expiry?)0DTE regime, expected move, pin risk, hedging, decayGrowth+
MaxPainAsync(symbol, expiration?)Max pain analysis with dealer alignment, pain curve, pin probabilityBasic+
ExposureSheetAsync(symbol, expiration?, minOi?)Per-strike GEX/DEX/VEX/CHEX dealer exposure sheet with totals, levels, peaksGrowth+
ExposureTermStructureAsync(symbol)Net GEX/DEX/VEX/CHEX broken out by expiry bucket (term structure of exposure)Growth+
ExposureBasketAsync(symbols, weights?)Weighted cross-symbol exposure aggregate (up to 50 symbols)Growth+
ExposureOiDiffAsync(symbol, topN?)Largest open-interest changes since the prior snapshotGrowth+

Flow (live, simulation-aware) โ€” Growth+ (raw tape, unusual-flow signals, OI simulator state & the full live bundle are Alpha)

Each method has a strongly-typed *TypedAsync variant (e.g. FlowLevelsTypedAsync).

MethodDescription
FlowLevelsAsync(symbol, expiry?)Live gamma flip / call & put walls / max pain
FlowPinRiskAsync(symbol, expiry?)0DTE pin-risk score + component breakdown
FlowSummaryAsync(symbol, expiry?)At-a-glance flow direction + headline GEX shift
FlowOiAsync(symbol, expiry?)Open-interest simulator state (official vs intraday)
FlowGexAsync(symbol, expiry?)Live (flow-adjusted) GEX + per-strike profile
FlowDexAsync(symbol, expiry?)Live (flow-adjusted) DEX + per-strike profile
FlowDealerRiskAsync(symbol, expiry?)Settled-vs-live dealer GEX/DEX + flow adjustment
FlowLiveAsync(symbol, expiry?)Everything-at-once live flow bundle
FlowSignalsAsync(symbol, minScore?, intent?, structure?, windowMinutes?, limit?, expiry?)Scored, classified unusual-flow feed (block/sweep, intent, 0-100 score)
FlowSignalsSummaryAsync(symbol, windowMinutes?, expiry?)Net bullish/bearish + opening/closing premium roll-up + top 10 signals
FlowOptionRecentAsync(symbol, limit?, expiry?)Recent option trades, newest-first
FlowOptionSummaryAsync(symbol, expiry?)Per-underlying option-flow aggregates
FlowOptionBlocksAsync(symbol, minSize?, expiry?)Large option prints (size >= minSize)
FlowOptionHistoryAsync(symbol, minutes?, expiry?)Per-minute option-flow buckets
FlowOptionCumulativeAsync(symbol, minutes?, expiry?)Cumulative option net-flow series
FlowStockRecentAsync(symbol, limit?)Recent stock trades, newest-first
FlowStockSummaryAsync(symbol)Per-symbol stock-flow aggregates
FlowStockBlocksAsync(symbol, minSize?)Large stock prints (size >= minSize)
FlowStockHistoryAsync(symbol, minutes?)Per-minute stock-flow buckets w/ OHLC
FlowStockCumulativeAsync(symbol, minutes?)Cumulative stock net-flow series
FlowOptionsLeaderboardAsync(n?, windowMinutes?)Cross-symbol option-flow leaderboard
FlowOptionsOutliersAsync(limit?, minTrades?, windowMinutes?)Cross-symbol option-flow outliers
FlowStocksLeaderboardAsync(n?, windowMinutes?)Cross-symbol stock-flow leaderboard
FlowStocksOutliersAsync(limit?, minTrades?, windowMinutes?)Cross-symbol stock-flow outliers
FlowStockBarsAsync(symbol, resolution, minutes?)Multi-resolution OHLCV + flow bars from the live trade tape
FlowDealerPremiumAsync(symbol, windowMinutes?, expiry?)Net dealer premium roll-up over the full tape (VWAP-weighted)

Pricing and Sizing

MethodDescriptionPlan
GreeksAsync(spot, strike, dte, sigma, type?, r?, q?)Full BSM greeks (first, second, third order)Free
IvAsync(spot, strike, dte, price, type?, r?, q?)Implied volatility from market priceFree
KellyAsync(spot, strike, dte, sigma, premium, mu, type?, r?, q?)Kelly criterion optimal position sizeGrowth+

Volatility Analytics

MethodDescriptionPlan
VolatilityAsync(symbol)Comprehensive volatility analysisGrowth+
AdvVolatilityAsync(symbol)SVI parameters, variance surface, arbitrage detection, variance swapAlpha+
LiquidityAsync(symbol)Per-expiry execution / liquidity score (ATM spread %, OI-weighted spread %, depth)Growth+
SkewTermAsync(symbol)Skew + term-structure of IV (25-delta risk reversals, ATM term curve)Growth+
SpotVolCorrelationAsync(symbol)Spotโ€“vol correlation / leverage-effect regimeGrowth+
RealizedVolatilityAsync(symbol)Range-based realized vol estimators (close-to-close, Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang) over 10/20/30-day windowsAlpha+
VolatilityForecastAsync(symbol, dist?)Conditional vol forecasts (EWMA ฮป=0.94, HAR-RV, GARCH(1,1) MLE with multi-horizon term structure)Alpha+
DispersionAsync(index, symbols, weights?, horizonDays?)Implied vs realized correlation (dispersion / vol-arb) for an index vs a basketAlpha+
ExpectedMoveAsync(symbol, expiry?)Options-implied expected move (straddle-derived) per expiryBasic+
VrpHistoryAsync(symbol, days?)Historical variance-risk-premium (VRP) time seriesAlpha+

Macro / Universe

MethodDescriptionPlan
VixStateAsync()VIX term-structure regime (contango/backwardation, VIX/VIX3M, percentiles)Growth+
UniverseAsync(sort?, limit?)Curated tier-1 / tier-2 pre-warmed symbol universePublic

Strategy Signals

All ten endpoints return the shared StrategyDecisionResponse envelope (decision, conviction, scored structure proposal, context). Each has a *TypedAsync variant.

MethodDescriptionPlan
StrategyFlowAnomalyAsync(symbol, expiry?)Directional options-flow anomaly score + matching short verticalGrowth+
StrategyExpiryPositioningAsync(symbol, expiry?, minOpenInterest?, wingWidth?)OPEX pin-risk score + iron-fly proposalBasic+
StrategyZeroDteAsync(symbol, expiry?, minOpenInterest?, wingWidth?)0DTE intraday structure proposal (iron fly / condor)Growth+ (+0DTE)
StrategyDealerRegimeAsync(symbol, expiry?)Dealer-regime read (positive vs negative gamma)Growth+
StrategyVolCarryAsync(symbol, expiry?, โ€ฆ)Vol-carry harvesting candidate (short premium under positive carry)Alpha+
StrategyYieldEnhancementAsync(symbol, expiry?, โ€ฆ)Covered-call / cash-secured-put overlay proposalGrowth+
StrategySurfaceAnomalyAsync(symbol, expiry?)Surface-anomaly / vol-arbitrage signalAlpha+
StrategySkewAsync(symbol, expiry?)Skew-trade signal (risk-reversal / put-skew richness)Growth+
StrategyTermStructureAsync(symbol)Term-structure signal (calendar / diagonal opportunity)Growth+
StrategyTailPricingAsync(symbol, expiry?)Tail-pricing signal (wing richness / cheap convexity)Growth+

Earnings

MethodDescriptionPlan
EarningsCalendarAsync(days?, symbols?, importance?)Upcoming earnings calendar over a forward windowGrowth+
EarningsExpectedMoveAsync(symbol)Earnings-implied (straddle-derived) move for the next eventGrowth+
EarningsHistoryAsync(symbol, limit?)Historical earnings reactions (implied vs realized move, surprises)Growth+
EarningsIvCrushAsync(symbol)Estimated post-earnings IV crush (front-month deflation)Growth+
EarningsVrpAsync(symbol)Earnings variance risk premium with surprise reactionsAlpha+
EarningsDealerPositioningAsync(symbol)Dealer positioning into the event (GEX buckets, top strikes, levels)Alpha+
EarningsStrategiesAsync(symbol)Earnings-aware strategy scores (straddle/strangle/iron-condor)Alpha+
EarningsScreenerAsync(sort?, limit?, days?, minImportance?)Cross-sectional earnings screener (VRP richest / cheapest move / highest crush / importance)Alpha+

Structures (multi-leg, pure-math POST)

MethodDescriptionPlan
StructurePnlAsync(request)At-expiry P&L curve, breakevens, max profit/loss for a multi-leg structureBasic+
StructureGreeksAsync(request)Aggregated, quantity-scaled, direction-signed position GreeksBasic+

Zero-DTE Flow (intraday)

MethodDescriptionPlan
FlowZeroDteSnapshotAsync(symbol)Live 0DTE flow snapshot (0DTE analytics + intraday flow direction)Growth+
FlowZeroDteSeriesAsync(symbol, bar?, minutes?)Intraday 0DTE flow time series (one bar per interval)Growth+
FlowZeroDteHedgeFlowAsync(symbol, side?, bar?, minutes?)Estimated dealer hedge-flow time series for today's 0DTE chainGrowth+
`FlowZeroDteHeatmapAsync(symbol, metric?, mode?, bar?, minutes?)$\text{Per}-\text{strike} \text{value} \text{matrix} \text{for} \text{a} \text{strike} \times \text{time} 0\text{DTE} \text{heatmap}\text{Alpha}+
$FlowZeroDteStrikeFlowAsync(symbol, bar?, minutes?)`Per-strike signed aggressor flow over today's 0DTE sessionAlpha+

Reference Data

MethodDescriptionPlan
TickersAsync()All available stock tickersFree
OptionsAsync(ticker)Option chain metadata (expirations and strikes)Free
SymbolsAsync()Currently active symbols with live dataFree
ScreenerFieldsAsync()Catalogue of screener fields available for filters/sort/select/formulasFree

Account and System

MethodDescriptionPlan
AccountAsync()Account info and quota usageAny
HealthAsync()API health check (no auth required)Public

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.

// Gamma exposure for the E-mini S&P 500 future
var gex = await client.GexAsync("ES=F");
Console.WriteLine(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/ES%3DF); SDK methods take the plain string "ES=F". Historical replay for futures is coming; live analytics are available now.

Error handling

using FlashAlpha;

try
{
    var result = await client.GexAsync("SPY");
}
catch (AuthenticationException ex)
{
    // HTTP 401: invalid or missing API key
    Console.WriteLine($"Auth error: {ex.Message}");
}
catch (TierRestrictedException ex)
{
    // HTTP 403: endpoint requires a higher plan
    Console.WriteLine($"Upgrade required. Current: {ex.CurrentPlan}, Required: {ex.RequiredPlan}");
}
catch (NotFoundException ex)
{
    // HTTP 404: symbol or resource not found
    Console.WriteLine($"Not found: {ex.Message}");
}
catch (RateLimitException ex)
{
    // HTTP 429: rate limit exceeded
    Console.WriteLine($"Rate limited. Retry after {ex.RetryAfter}s");
}
catch (ServerException ex)
{
    // HTTP 5xx: server-side error
    Console.WriteLine($"Server error {ex.StatusCode}: {ex.Message}");
}
catch (FlashAlphaException ex)
{
    // Any other API error
    Console.WriteLine($"API error {ex.StatusCode}: {ex.Message}");
}

All exceptions derive from FlashAlphaException, which exposes:

  • StatusCode (int): the HTTP status code
  • Response (JsonElement?): the raw JSON body, if the server returned one

Dependency injection

FlashAlphaClient accepts a pre-configured HttpClient, making it compatible with IHttpClientFactory and easy to mock in unit tests:

// ASP.NET Core registration
builder.Services.AddHttpClient<FlashAlphaClient>(client =>
{
    client.BaseAddress = new Uri("https://lab.flashalpha.com");
    client.DefaultRequestHeaders.Add("X-Api-Key", builder.Configuration["FlashAlpha:ApiKey"]);
});

Running the tests

Unit tests run without a key:

dotnet test

Integration tests require a live API key:

set FLASHALPHA_API_KEY=your_key_here
dotnet test

License

MIT. See LICENSE.

Other SDKs

LanguagePackageRepository
Pythonpip install flashalphaflashalpha-python
JavaScriptnpm i flashalphaflashalpha-js
JavaMaven Centralflashalpha-java
Gogo get github.com/FlashAlpha-lab/flashalpha-goflashalpha-go
MCPClaude / LLM tool serverflashalpha-mcp

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