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
Support optional CreateSubaccountRequest body (exchange_index) on subaccounts.create() (spec 3.23.0) #465
New schema:CreateSubaccountRequest — a single optional exchange_index field (defaults to 0).
create() currently posts json={}, which stays functionally compatible (every field is optional), so nothing breaks. But:
create() cannot target a non-zero exchange shard.
Its docstring/comments are now stale — e.g. kalshi/resources/subaccounts.py says "empty body (spec takes no request payload)" / "Spec defines no requestBody", which is no longer true as of 3.23.0.
Scope
Add a CreateSubaccountRequest model (extra="forbid", optional exchange_index).
Add an optional exchange_index param to create() (sync + async); build the body via the request model.
Fix the stale docstring/comments.
Register request_body_schema in METHOD_ENDPOINT_MAP + BODY_MODEL_MAP; add a test.
Provenance
Surfaced during the #463 spec-drift reconciliation (3.22.0 → 3.23.0) as an out-of-scope enhancement. Low urgency (backward-compatible).
Activity
feat(subaccounts): implement position-transfer + create body (v3.23.0)