Skip to content

Commit 4a62aaa

Browse files
tdobrowolski1claude
andcommitted
Fix AccountResponse.daily_limit/remaining typing: number -> string
Wire returns 'unlimited' (string) for Alpha/Enterprise tiers, plus numeric strings on bounded plans. Previous int/number typing would silently fail to deserialize for unlimited-tier accounts. Bump to rc.11. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 15be4dd commit 4a62aaa

2 files changed

Lines changed: 13 additions & 5 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.0rc10"
7+
version = "0.4.0rc11"
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/types.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,17 +2529,25 @@ class AccountResponse(TypedDict, total=False):
25292529
"""Account info & quota from ``GET /v1/account``.
25302530
25312531
Returns the caller's plan tier, the day's request quota, how much has
2532-
been consumed, and when the counter resets. ``daily_limit``, ``usage_today``,
2533-
and ``remaining`` are integers; ``resets_at`` is an ISO timestamp.
2532+
been consumed, and when the counter resets.
2533+
2534+
Note ``daily_limit`` and ``remaining`` are **strings, not ints** —
2535+
they are numeric strings (e.g. ``"1000"``) on bounded plans and the
2536+
literal ``"unlimited"`` on Alpha / Enterprise tiers. Only ``usage_today``
2537+
is a true integer.
25342538
"""
25352539

25362540
user_id: Optional[str]
25372541
email: Optional[str]
25382542
# Plan tier (e.g. ``"free"``, ``"basic"``, ``"growth"``, ``"alpha"``).
25392543
plan: Optional[str]
2540-
daily_limit: Optional[int]
2544+
# Numeric string (e.g. ``"1000"``) on bounded plans; literal
2545+
# ``"unlimited"`` on Alpha/Enterprise.
2546+
daily_limit: Optional[str]
2547+
# Requests consumed today (integer).
25412548
usage_today: Optional[int]
2542-
remaining: Optional[int]
2549+
# Numeric string on bounded plans; ``"unlimited"`` on uncapped tiers.
2550+
remaining: Optional[str]
25432551
# ISO timestamp at which ``usage_today`` resets to zero.
25442552
resets_at: Optional[str]
25452553

0 commit comments

Comments
 (0)