Summary
OpenAPI 3.23.0 added a brand-new endpoint the SDK does not yet expose:
- Path:
POST /portfolio/subaccounts/positions/transfer
- operationId:
ApplySubaccountPositionTransfer
- 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-only transfer() (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.
Summary
OpenAPI 3.23.0 added a brand-new endpoint the SDK does not yet expose:
POST /portfolio/subaccounts/positions/transferApplySubaccountPositionTransferApplySubaccountPositionTransferRequest(required:client_transfer_id,from_subaccount,to_subaccount,market_ticker,side,count,price_cents) andApplySubaccountPositionTransferResponse(position_transfer_id).This is a genuine new capability — moving an open position between subaccounts, distinct from the existing cash-only
transfer()(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
ApplySubaccountPositionTransferRequest/ApplySubaccountPositionTransferResponsemodels tokalshi/models/subaccounts.py.transfer_position(...)toSubaccountsResource+AsyncSubaccountsResource(kalshi/resources/subaccounts.py), building the request model internally and serializing viamodel_dump(exclude_none=True, by_alias=True, mode="json").METHOD_ENDPOINT_MAP(withrequest_body_schema) andBODY_MODEL_MAP; add response contract-map entries where applicable.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.