FlashAlpha.Historical 0.1.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package FlashAlpha.Historical --version 0.1.0
                    
NuGet\Install-Package FlashAlpha.Historical -Version 0.1.0
                    
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.Historical" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FlashAlpha.Historical" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="FlashAlpha.Historical" />
                    
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.Historical --version 0.1.0
                    
#r "nuget: FlashAlpha.Historical, 0.1.0"
                    
#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.Historical@0.1.0
                    
#: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.Historical&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=FlashAlpha.Historical&version=0.1.0
                    
Install as a Cake Tool

FlashAlpha.Historical (.NET)

Official .NET SDK for the FlashAlpha Historical API — point-in-time replay of every live analytics endpoint. Ask what GEX, gamma flip, VRP, narrative, max pain, or the full stock summary looked like at any minute back to 2018-04-16, in the same response shape as the live API.

dotnet add package FlashAlpha.Historical

.NET 8.0+. Same X-Api-Key you use for api.flashalpha.com — Alpha plan or higher on every endpoint.

Quickstart

using FlashAlpha.Historical;

using var hx = new FlashAlphaHistoricalClient("YOUR_API_KEY");

// One snapshot — what dealer positioning looked like during the COVID crash
var snap = await hx.ExposureSummaryAsync("SPY", "2020-03-16T15:30:00");
Console.WriteLine(snap.GetProperty("regime").GetString());
// → "negative_gamma"

The at parameter accepts strings ("2026-03-05T15:30:00" or "2026-03-05" → defaults to 16:00 ET) and DateTime overloads.

Backtesting

using FlashAlpha.Historical;

using var hx = new FlashAlphaHistoricalClient(Environment.GetEnvironmentVariable("FLASHALPHA_API_KEY")!);

var bt = new Backtester(hx, Backtester.StockSummaryEndpoint, "SPY");

var results = await bt.RunAsync(
    Replay.IterDays(new(2024, 1, 2), new(2024, 3, 29)),
    (at, snap) => new
    {
        Vrp = snap.GetProperty("volatility").GetProperty("vrp").GetDouble(),
        Regime = snap.GetProperty("exposure").GetProperty("regime").GetString(),
    });

Console.WriteLine($"days replayed: {results.Count}");

Minute-level

await foreach (var step in Replay.RunAsync(
    hx, Backtester.ExposureSummaryEndpoint, "SPY",
    Replay.IterMinutes(new(2025, 1, 15), new(2025, 1, 15), stepMinutes: 15)))
{
    Console.WriteLine($"{step.At} {step.Response.GetProperty("regime").GetString()}");
}

API surface

Every analytics method takes a required at string (or DateTime overload):

Method Endpoint
TickersAsync(symbol?) /v1/tickers
StockQuoteAsync(t, at) /v1/stockquote/{t}
OptionQuoteAsync(t, at, expiry?, strike?, type?) /v1/optionquote/{t}
SurfaceAsync(s, at) /v1/surface/{s}
GexAsync(s, at, expiration?, minOi?) /v1/exposure/gex/{s}
DexAsync(s, at, expiration?) /v1/exposure/dex/{s}
VexAsync(s, at, expiration?) /v1/exposure/vex/{s}
ChexAsync(s, at, expiration?) /v1/exposure/chex/{s}
ExposureSummaryAsync(s, at) /v1/exposure/summary/{s}
ExposureLevelsAsync(s, at) /v1/exposure/levels/{s}
NarrativeAsync(s, at) /v1/exposure/narrative/{s}
ZeroDteAsync(s, at, strikeRange?) /v1/exposure/zero-dte/{s}
MaxPainAsync(s, at, expiration?) /v1/maxpain/{s}
StockSummaryAsync(s, at) /v1/stock/{s}/summary
VolatilityAsync(s, at) /v1/volatility/{s}
AdvVolatilityAsync(s, at) /v1/adv_volatility/{s}
VrpAsync(s, at) /v1/vrp/{s}

Errors

using FlashAlpha.Historical;

try {
    await hx.ExposureSummaryAsync("SPY", "2017-01-01");
}
catch (NoDataException) { /* outside coverage / inside gap */ }
catch (InvalidAtException) { /* 400 invalid_at */ }
catch (TierRestrictedException ex) {
    Console.WriteLine($"need {ex.RequiredPlan}, have {ex.CurrentPlan}");
}
Exception Status
FlashAlphaHistoricalException base
AuthenticationException 401
TierRestrictedException 403 — needs Alpha plan
InvalidAtException 400 — bad at format
NoDataException 404 — outside coverage / inside gap
SymbolNotFoundException 404 — symbol not at this at
NoCoverageException 404 — symbol not in historical dataset
InsufficientDataException 404 — surface grid too sparse
RateLimitException 429
ServerException 5xx

License

MIT

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

Showing the top 1 NuGet packages that depend on FlashAlpha.Historical:

Package Downloads
FlashAlpha.QuantConnect

FlashAlpha options-flow and dealer-positioning data as QuantConnect LEAN custom-data bars. GEX, DEX, VEX, vol surface, 0DTE, VRP, max-pain.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0-rc.10 85 5/7/2026
0.4.0-rc.9 42 5/7/2026
0.4.0-rc.8 48 5/7/2026
0.4.0-rc.7 47 5/7/2026
0.4.0-rc.5 47 5/6/2026
0.4.0-rc.4 45 5/6/2026
0.4.0-rc.2 42 5/6/2026
0.4.0-rc.1 53 5/5/2026
0.1.0 94 5/4/2026