flashalpha 1.2.2__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flashalpha-1.2.2 → flashalpha-1.3.0}/.gitignore +8 -8
- {flashalpha-1.2.2 → flashalpha-1.3.0}/LICENSE +21 -21
- {flashalpha-1.2.2 → flashalpha-1.3.0}/PKG-INFO +83 -8
- {flashalpha-1.2.2 → flashalpha-1.3.0}/README.md +468 -393
- {flashalpha-1.2.2 → flashalpha-1.3.0}/pyproject.toml +99 -99
- {flashalpha-1.2.2 → flashalpha-1.3.0}/src/flashalpha/__init__.py +3 -1
- {flashalpha-1.2.2 → flashalpha-1.3.0}/src/flashalpha/exceptions.py +39 -39
- {flashalpha-1.2.2 → flashalpha-1.3.0}/src/flashalpha/types.py +427 -2
- {flashalpha-1.2.2 → flashalpha-1.3.0}/src/flashalpha/client.py +0 -0
|
@@ -211,11 +211,11 @@ cython_debug/
|
|
|
211
211
|
marimo/_static/
|
|
212
212
|
marimo/_lsp/
|
|
213
213
|
__marimo__/
|
|
214
|
-
|
|
215
|
-
# Sandbox / agent / harness caches (cross-ecosystem — defensive)
|
|
216
|
-
.dotnet/
|
|
217
|
-
.gocache/
|
|
218
|
-
.gopath/
|
|
219
|
-
.m2/
|
|
220
|
-
.review-artifacts/
|
|
221
|
-
.agent-tools/
|
|
214
|
+
|
|
215
|
+
# Sandbox / agent / harness caches (cross-ecosystem — defensive)
|
|
216
|
+
.dotnet/
|
|
217
|
+
.gocache/
|
|
218
|
+
.gopath/
|
|
219
|
+
.m2/
|
|
220
|
+
.review-artifacts/
|
|
221
|
+
.agent-tools/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 FlashAlpha
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FlashAlpha
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: flashalpha
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: Python SDK for the FlashAlpha options analytics API — live options screener, gamma exposure (GEX), VRP, delta, vanna, charm, greeks, 0DTE analytics, volatility surfaces, and more.
|
|
5
5
|
Project-URL: Homepage, https://flashalpha.com
|
|
6
6
|
Project-URL: Documentation, https://flashalpha.com/docs
|
|
@@ -55,7 +55,9 @@ fa = FlashAlpha("YOUR_API_KEY") # Get a free key at flashalpha.com
|
|
|
55
55
|
# Gamma exposure by strike
|
|
56
56
|
gex = fa.gex("SPY")
|
|
57
57
|
print(f"Net GEX: ${gex['net_gex']:,.0f}")
|
|
58
|
-
|
|
58
|
+
# gamma_flip is None unless gamma_flip_status == "available" -- never format it
|
|
59
|
+
# as a number without checking first.
|
|
60
|
+
print(f"Gamma flip: {gex['gamma_flip']} ({gex['gamma_flip_status']})")
|
|
59
61
|
|
|
60
62
|
for strike in gex["strikes"][:5]:
|
|
61
63
|
print(f" {strike['strike']}: net ${strike['net_gex']:,.0f}")
|
|
@@ -63,6 +65,78 @@ for strike in gex["strikes"][:5]:
|
|
|
63
65
|
|
|
64
66
|
Get your free API key at [flashalpha.com](https://flashalpha.com) — no credit card required.
|
|
65
67
|
|
|
68
|
+
> **`gamma_flip` is nullable.** A dealer gamma flip is only published when the
|
|
69
|
+
> level is well-determined, which is a minority of chains. When it is withheld,
|
|
70
|
+
> `gamma_flip` is `null`, `regime` is `"unknown"`, and `gamma_flip_status` carries
|
|
71
|
+
> a reason code (`no_boundary`, `insufficient_local_coverage`,
|
|
72
|
+
> `insufficient_quote_quality`, `sensitive_root`, `uncertain_root_path`,
|
|
73
|
+
> `stored_sign_mismatch`, `search_budget`, `quality_budget`). Only
|
|
74
|
+
> `gamma_flip_status == "available"` guarantees a number; treat any other value -
|
|
75
|
+
> including codes added in future - as "no level published".
|
|
76
|
+
|
|
77
|
+
## Data provenance: `data_as_of`
|
|
78
|
+
|
|
79
|
+
Every successful JSON-object response carries `data_as_of`, reporting when each upstream
|
|
80
|
+
feed last delivered to the node that answered, plus `endpoint_version` identifying the
|
|
81
|
+
deployment that produced it. That is every method on this client except the handful that
|
|
82
|
+
return a bare JSON array - see the note at the end of this section.
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
gex = fa.gex("SPY")
|
|
86
|
+
|
|
87
|
+
print(gex["data_as_of"]["equity_options_feed"]) # 2026-08-25T18:48:58.204Z
|
|
88
|
+
print(gex["data_as_of"]["oi_feed"]) # 2026-08-24T20:00:00.000Z (prior session)
|
|
89
|
+
print(gex["data_as_of"]["node"]) # fa2
|
|
90
|
+
print(gex["endpoint_version"]) # 2026.08.25
|
|
91
|
+
|
|
92
|
+
# Typed: DataAsOf is exported for annotation and editor completion.
|
|
93
|
+
from flashalpha import DataAsOf
|
|
94
|
+
stamps: DataAsOf = gex["data_as_of"]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| Field | Feed | Expected cadence |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `node` | Which node answered | Nodes hydrate independently |
|
|
100
|
+
| `equity_feed` | Equity and ETF spot quotes | seconds, during market hours |
|
|
101
|
+
| `equity_options_feed` | Equity and ETF option quotes | seconds, during market hours |
|
|
102
|
+
| `index_feed` | Index spot (SPX, RUT, VIX and the other index roots) | seconds, during market hours |
|
|
103
|
+
| `index_options_feed` | Index option quotes | seconds, during market hours |
|
|
104
|
+
| `futures_feed` | Futures prices | seconds, during the futures session |
|
|
105
|
+
| `futures_options_feed` | Futures option quotes | seconds, during the futures session |
|
|
106
|
+
| `flow_feed` | Classified options and stock trade tape | seconds, during market hours |
|
|
107
|
+
| `oi_feed` | Settled open interest | daily, dated to the prior 16:00 ET close |
|
|
108
|
+
| `macro_feed` | VIX, VVIX, SKEW, MOVE, SPX, Fear & Greed | minutes; reports its OLDEST component |
|
|
109
|
+
|
|
110
|
+
### How to read it
|
|
111
|
+
|
|
112
|
+
- **Check the feeds your call depends on.** A GEX call on an equity is answered from
|
|
113
|
+
`equity_feed`, `equity_options_feed` and `oi_feed`. `futures_feed` being `null` in that
|
|
114
|
+
response says nothing about the answer.
|
|
115
|
+
- **Compare against the cadence, not the clock.** `oi_feed` at the previous session's
|
|
116
|
+
close is correct: settled open interest is published once per session, so on a Monday
|
|
117
|
+
the newest figure that exists is Friday's. An options feed an hour behind during the
|
|
118
|
+
regular session is not correct.
|
|
119
|
+
- **`null` means "not seen on this node", not "broken".** A node that has never been
|
|
120
|
+
asked for a futures symbol has never opened that feed.
|
|
121
|
+
- **Spot and options are separate on purpose.** They arrive over different pipes and can
|
|
122
|
+
fail independently.
|
|
123
|
+
- **It evidences feed activity, not per-contract freshness.** An illiquid strike may not
|
|
124
|
+
have quoted for hours while its feed is healthy.
|
|
125
|
+
- **`data_as_of` is not `as_of`.** `as_of` is response-generation time or the newest
|
|
126
|
+
contract in the payload, depending on the endpoint. `data_as_of` describes the feeds
|
|
127
|
+
behind it.
|
|
128
|
+
|
|
129
|
+
### Bare-array endpoints
|
|
130
|
+
|
|
131
|
+
A few endpoints return a bare JSON array, which has nowhere to put an envelope in the
|
|
132
|
+
body. The API sends the same information in the `X-Data-As-Of` and `X-Endpoint-Version`
|
|
133
|
+
response headers instead - but this client returns the parsed body only and does not
|
|
134
|
+
surface response headers, so the envelope is **not reachable through those methods**.
|
|
135
|
+
Call the HTTP endpoint directly if you need provenance for one of them.
|
|
136
|
+
|
|
137
|
+
Full reference: <https://flashalpha.com/docs/lab-api-overview#response-envelope> and the
|
|
138
|
+
methodology whitepaper at <https://flashalpha.com/methodology#freshness-reporting>.
|
|
139
|
+
|
|
66
140
|
## Features
|
|
67
141
|
|
|
68
142
|
### Live Options Screener
|
|
@@ -117,7 +191,8 @@ chex = fa.chex("NVDA") # Charm exposure
|
|
|
117
191
|
levels = fa.exposure_levels("SPY") # Key levels
|
|
118
192
|
print(f"Call wall: {levels['levels']['call_wall']}")
|
|
119
193
|
print(f"Put wall: {levels['levels']['put_wall']}")
|
|
120
|
-
print(f"Gamma flip: {levels['levels']['gamma_flip']}"
|
|
194
|
+
print(f"Gamma flip: {levels['levels']['gamma_flip']} "
|
|
195
|
+
f"({levels['levels']['gamma_flip_status']})")
|
|
121
196
|
|
|
122
197
|
summary = fa.exposure_summary("SPY") # Full summary (Growth+)
|
|
123
198
|
narrative = fa.narrative("SPY") # AI narrative (Growth+)
|
|
@@ -373,16 +448,16 @@ Get your API key at **[flashalpha.com](https://flashalpha.com)**
|
|
|
373
448
|
| `fa.structure_pnl(legs, ...)` | Multi-leg at-expiry P&L, breakevens, max P/L | Basic+ |
|
|
374
449
|
| `fa.structure_greeks(legs, spot=...)` | Aggregate multi-leg Black-Scholes greeks | Basic+ |
|
|
375
450
|
|
|
376
|
-
## Futures (CME
|
|
451
|
+
## Futures (CME)
|
|
377
452
|
|
|
378
|
-
FlashAlpha serves the full options-analytics stack for **CME
|
|
453
|
+
FlashAlpha serves the full options-analytics stack for **CME futures** across six complexes - equity index (`ES=F`, `NQ=F`, `RTY=F`, `YM=F`, `MES=F`, `MNQ=F`), metals (`GC=F` gold, `SI=F` silver), energy (`CL=F` crude oil, `NG=F` natural gas), the Treasury curve (`ZT=F`, `ZF=F`, `ZN=F`, `TN=F`, `ZB=F`, `UB=F`), grains (`ZC=F` corn, `ZS=F` soybeans, `ZW=F` wheat) and crypto (`BTC=F` bitcoin). Options-on-futures are priced with **Black-76** (forward-priced) and each root carries its own CME contract multiplier, so notionals and dollar gamma are in real dollars. Note the quote conventions: Treasuries are quoted in points of par and grains in cents, so their multipliers are the contract size divided by 100. 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.
|
|
379
454
|
|
|
380
455
|
```python
|
|
381
456
|
gex = fa.gex("ES=F") # Gamma exposure for the E-mini S&P 500 future
|
|
382
457
|
print(f"Net GEX: ${gex['net_gex']:,.0f}")
|
|
383
458
|
```
|
|
384
459
|
|
|
385
|
-
Use the `=F` suffix
|
|
460
|
+
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/GC%3DF`); SDK methods take the plain string `"GC=F"`. Futures symbols require the Growth plan or higher. Historical replay for futures is coming; live analytics are available now.
|
|
386
461
|
|
|
387
462
|
## Other SDKs
|
|
388
463
|
|
|
@@ -416,7 +491,7 @@ calculator and stock quotes. Paid tiers add:
|
|
|
416
491
|
- **DEX, VEX (vanna) and CHEX (charm) exposure, plus max pain** — from the **Basic tier**
|
|
417
492
|
($79/mo), with ETF and index symbols.
|
|
418
493
|
- **Full-chain GEX, 0DTE and flow analytics** — from the **Growth tier** ($299/mo).
|
|
419
|
-
- **Point-in-time replay since
|
|
494
|
+
- **Point-in-time replay since 2017, SVI vol surfaces, VRP analytics, higher-order Greeks**,
|
|
420
495
|
uncached and unlimited — the **Alpha tier** ($1,499/mo). FlashAlpha is one of the only
|
|
421
496
|
public APIs publishing aggregate vanna and charm exposure across the full universe, with
|
|
422
497
|
no look-ahead and no training-serving skew.
|