FlashAlpha 0.2.1

dotnet add package FlashAlpha --version 0.2.1
                    
NuGet\Install-Package FlashAlpha -Version 0.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FlashAlpha" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlashAlpha" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="FlashAlpha" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FlashAlpha --version 0.2.1
                    
#r "nuget: FlashAlpha, 0.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FlashAlpha@0.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FlashAlpha&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=FlashAlpha&version=0.2.1
                    
Install as a Cake Tool

FlashAlpha .NET SDK

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

Access 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.

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();

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

Method Description Plan
StockQuoteAsync(ticker) Live stock quote (bid/ask/mid/last) Free
OptionQuoteAsync(ticker, expiry?, strike?, type?) Option quotes with greeks Growth+
SurfaceAsync(symbol) Volatility surface grid Free
StockSummaryAsync(symbol) Comprehensive stock summary (price, vol, exposure, macro) Free

Historical Data

Method Description Plan
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

Method Description Plan
GexAsync(symbol, expiration?, minOi?) Gamma exposure by strike Free
DexAsync(symbol, expiration?) Delta exposure by strike Free
VexAsync(symbol, expiration?) Vanna exposure by strike Free
ChexAsync(symbol, expiration?) Charm exposure by strike Free
ExposureLevelsAsync(symbol) Key support/resistance levels from options exposure Free
ExposureSummaryAsync(symbol) Full GEX/DEX/VEX/CHEX summary + hedging pressure Growth+
NarrativeAsync(symbol) AI-generated verbal narrative of exposure Growth+
ZeroDteAsync(symbol, strikeRange?) 0DTE regime, expected move, pin risk, hedging, decay Growth+
ExposureHistoryAsync(symbol, days?) Daily exposure snapshots for trend analysis Growth+

Pricing and Sizing

Method Description Plan
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 price Free
KellyAsync(spot, strike, dte, sigma, premium, mu, type?, r?, q?) Kelly criterion optimal position size Growth+

Volatility Analytics

Method Description Plan
VolatilityAsync(symbol) Comprehensive volatility analysis Growth+
AdvVolatilityAsync(symbol) SVI parameters, variance surface, arbitrage detection, variance swap Alpha+

Reference Data

Method Description Plan
TickersAsync() All available stock tickers Free
OptionsAsync(ticker) Option chain metadata (expirations and strikes) Free
SymbolsAsync() Currently active symbols with live data Free

Account and System

Method Description Plan
AccountAsync() Account info and quota usage Any
HealthAsync() API health check (no auth required) Public

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.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.1 40 3/28/2026
0.2.0 60 3/28/2026