Skip to content

Commit 15be4dd

Browse files
tdobrowolski1claude
andcommitted
rc.10: pricing/iv/kelly, account, tickers, symbols, options-meta, health, screener TypedDicts + retyped client; rc.9 field-walk tests
Bump to 0.4.0rc10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 55e016a commit 15be4dd

5 files changed

Lines changed: 609 additions & 10 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "flashalpha"
7-
version = "0.4.0rc9"
7+
version = "0.4.0rc10"
88
description = "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."
99
readme = "README.md"
1010
license = "MIT"

src/flashalpha/__init__.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,24 @@
119119
# ── Live-only Quote endpoints ──
120120
OptionQuoteResponse,
121121
StockQuoteResponse,
122+
# ── Pricing IV ──
123+
PricingIvInputs,
124+
PricingIvResponse,
125+
# ── Pricing Kelly ──
126+
PricingKellyInputs,
127+
PricingKellySizing,
128+
PricingKellyAnalysis,
129+
PricingKellyResponse,
130+
# ── Account / Reference / System ──
131+
AccountResponse,
132+
TickersResponse,
133+
SymbolsResponse,
134+
OptionsMetaExpiration,
135+
OptionsMetaResponse,
136+
HealthResponse,
137+
# ── Screener ──
138+
ScreenerMeta,
139+
ScreenerResponse,
122140
)
123141

124142
__version__ = "0.4.0rc1"
@@ -242,4 +260,22 @@
242260
# ── Live-only Quote endpoints ──
243261
"OptionQuoteResponse",
244262
"StockQuoteResponse",
263+
# ── Pricing IV (Free+, live-only) ──
264+
"PricingIvResponse",
265+
"PricingIvInputs",
266+
# ── Pricing Kelly (Growth+, live-only) ──
267+
"PricingKellyResponse",
268+
"PricingKellyInputs",
269+
"PricingKellySizing",
270+
"PricingKellyAnalysis",
271+
# ── Account / Reference / System ──
272+
"AccountResponse",
273+
"TickersResponse",
274+
"SymbolsResponse",
275+
"OptionsMetaResponse",
276+
"OptionsMetaExpiration",
277+
"HealthResponse",
278+
# ── Screener ──
279+
"ScreenerResponse",
280+
"ScreenerMeta",
245281
]

src/flashalpha/client.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,27 @@
1818

1919
if TYPE_CHECKING:
2020
from .types import (
21+
AccountResponse,
2122
AdvVolatilityResponse,
2223
ChexResponse,
2324
DexResponse,
2425
ExposureLevelsResponse,
2526
ExposureSummaryResponse,
2627
GexResponse,
28+
HealthResponse,
2729
MaxPainResponse,
2830
NarrativeResponse,
2931
OptionQuoteResponse,
32+
OptionsMetaResponse,
3033
PricingGreeksResponse,
34+
PricingIvResponse,
35+
PricingKellyResponse,
36+
ScreenerResponse,
3137
StockQuoteResponse,
3238
StockSummaryResponse,
3339
SurfaceResponse,
40+
SymbolsResponse,
41+
TickersResponse,
3442
VexResponse,
3543
VolatilityResponse,
3644
VrpResponse,
@@ -274,7 +282,7 @@ def iv(
274282
type: str = "call",
275283
r: float | None = None,
276284
q: float | None = None,
277-
) -> dict:
285+
) -> PricingIvResponse:
278286
"""Implied volatility from market price."""
279287
params: dict[str, Any] = {"spot": spot, "strike": strike, "dte": dte, "price": price, "type": type}
280288
if r is not None:
@@ -295,7 +303,7 @@ def kelly(
295303
type: str = "call",
296304
r: float | None = None,
297305
q: float | None = None,
298-
) -> dict:
306+
) -> PricingKellyResponse:
299307
"""Kelly criterion optimal position sizing. Requires Growth+."""
300308
params: dict[str, Any] = {
301309
"spot": spot,
@@ -324,15 +332,15 @@ def adv_volatility(self, symbol: str) -> AdvVolatilityResponse:
324332

325333
# ── Reference Data ──────────────────────────────────────────────
326334

327-
def tickers(self) -> dict:
335+
def tickers(self) -> TickersResponse:
328336
"""All available stock tickers."""
329337
return self._get("/v1/tickers")
330338

331-
def options(self, ticker: str) -> dict:
339+
def options(self, ticker: str) -> OptionsMetaResponse:
332340
"""Option chain metadata (expirations + strikes)."""
333341
return self._get(f"/v1/options/{_seg(ticker)}")
334342

335-
def symbols(self) -> dict:
343+
def symbols(self) -> SymbolsResponse:
336344
"""Currently queried symbols with live data."""
337345
return self._get("/v1/symbols")
338346

@@ -393,7 +401,7 @@ def screener(
393401
formulas: list[dict[str, str]] | None = None,
394402
limit: int | None = None,
395403
offset: int | None = None,
396-
) -> dict:
404+
) -> ScreenerResponse:
397405
"""Live options screener — filter/rank symbols by gamma exposure, VRP,
398406
volatility, greeks, and more.
399407
@@ -462,10 +470,10 @@ def screener(
462470

463471
# ── Account & System ────────────────────────────────────────────
464472

465-
def account(self) -> dict:
473+
def account(self) -> AccountResponse:
466474
"""Account info and quota."""
467475
return self._get("/v1/account")
468476

469-
def health(self) -> dict:
477+
def health(self) -> HealthResponse:
470478
"""Health check (public, no auth required)."""
471479
return self._get("/health")

0 commit comments

Comments
 (0)