You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
communications.list_rfqs / list_quotes accept status: str | None — should be Literal-narrowed #324
Every other paginated list(...) that takes a status= kwarg narrows it to a Literal alias (OrderStatusLiteral, IncentiveProgramStatusLiteral, etc.). CommunicationsResource.list_rfqs and list_quotes (sync + async) are the only resources where status is bare str. The Kalshi spec defines closed enums for RFQ status and Quote status; the SDK simply hasn't declared the Literal aliases.
Concrete impact: client.communications.list_rfqs(status="accpeted") (typo) round-trips to the server (which returns 200 with an empty result depending on filter semantics) instead of being flagged at the call site by mypy/IDE autocomplete. The SDK README advertises "Literal types on fixed-enum kwargs" as a headline feature; the gap here breaks that promise. UserFilterLiteral already lives in the same module, so the pattern is in place.
kalshi/models/communications.py:11-12 — Literal pattern already established here:
UserFilterLiteral=Literal["self"]
Suggested fix
In kalshi/models/communications.py, add RfqStatusLiteral and QuoteStatusLiteral aliases mirroring the spec enum values. Export from kalshi/__init__.py. Narrow status kwargs on list_rfqs, list_all_rfqs, list_quotes, list_all_quotes (sync + async). If the spec leaves either enum open-ended, use Literal[...] | str so existing callers keep working but autocomplete still surfaces the canonical set.
Activity
polish(resources): communications status Literal + V2 batch bytes-fas…
release: 2.7.0 — post-v2.6 independent multi-LLM reviewer SDK audit c…