Repository navigation
fix(spec): FCM position transfers, ApiKey.key_type, managed_isolated (#574) — 22.10.0 - #576
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #574
Reconciles spec drift from the 2026-11-09 Weekly Spec Sync (core OpenAPI 3.36.0 content change, perps OpenAPI, perps AsyncAPI). Spec hashes verified against the issue.
kalshi/_generated/regenerated (no diff). Release 22.10.0 (minor — additive optional only).Changes
ApiKey.key_typeoptional (ApiKeyTypeLiteral | None).SubaccountTypeLiteralgains"managed_isolated".perps.fcm.transfer_position(...)sync/async →POST /margin/fcm/positions/transfers(201CreateMarginFCMPositionTransferResponse). Request modelCreateMarginFCMPositionTransferRequestwithextra="forbid", dumped withexclude_none=True, by_alias=True, mode="json". Never retried (POST). Registered inPERPS_METHOD_ENDPOINT_MAP,PERPS_BODY_MODEL_MAP, andPERPS_CONTRACT_MAP.market_lifecycle_v2.is_deactivated) reflected in docs/docstrings.pyproject.toml,kalshi/__init__.py,CHANGELOG.md).Blast radius (hand-written; GitNexus unavailable)
ApiKey: one new optional field defaulting toNone; existing parsing unaffected. Consumers:api_keys.list/create/generateresponses only.SubaccountTypeLiteral: widened Literal (superset) used by perpsportfolio,margin_account,fundingmodels — only effect is that responses carryingmanaged_isolatednow validate instead of failing. Type checkers doing exhaustive matching on the Literal will see a new member (additive).FcmResource/AsyncFcmResource: new method + private body builder only; existing methods untouched. New exports appended tokalshi.perpsandkalshi.perps.models__all__.Gates (head a9d7492)
uv run ruff check .— passuv run mypy kalshi/— pass (161 files)uv run pytest tests/ --ignore=tests/integration -q— 5145 passed, 3 skippeduv run pytest tests/test_contracts.py -W error::UserWarning— 935 passed