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
Add transfer_position() for POST /portfolio/subaccounts/positions/transfer (spec 3.23.0) #464
New schemas:ApplySubaccountPositionTransferRequest (required: client_transfer_id, from_subaccount, to_subaccount, market_ticker, side, count, price_cents) and ApplySubaccountPositionTransferResponse (position_transfer_id).
This is a genuine new capability — moving an open position between subaccounts, distinct from the existing cash-onlytransfer() (POST /portfolio/subaccounts/transfer). The generated models already picked the schemas up (kalshi/_generated/models.py), but there is no facade method.
The contract drift suite does not flag this — it has no spec-path completeness gate, so a spec path with no SDK method is invisible.
Scope
Add ApplySubaccountPositionTransferRequest / ApplySubaccountPositionTransferResponse models to kalshi/models/subaccounts.py.
Add transfer_position(...) to SubaccountsResource + AsyncSubaccountsResource (kalshi/resources/subaccounts.py), building the request model internally and serializing via model_dump(exclude_none=True, by_alias=True, mode="json").
Register in METHOD_ENDPOINT_MAP (with request_body_schema) and BODY_MODEL_MAP; add response contract-map entries where applicable.
Export the new models; add tests (happy/error/edge).
Provenance
Surfaced during the #463 spec-drift reconciliation (3.22.0 → 3.23.0) as an out-of-scope new capability. #463 covered only the 18 drift-test failures + defensive optional-ization of removed/relaxed fields.
Activity
feat(subaccounts): implement position-transfer + create body (v3.23.0)