Reconcile OpenAPI 3.29.0 spec drift (v13.0.0) - #509
Merged
Conversation
Closes #507. Closes #508. Adds weather index, target-balance allocation, cancel-all (event + margin), perps exit triggers, FCM asset_class IM caps, and Klear settlement prices / maintenance-margin estimate. Breaking: Fill, MarketPosition, Settlement, FillPayload, and UserOrdersPayload require exchange_index.
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 #507. Closes #508.
Reconciles nightly spec-drift against upstream OpenAPI 3.28.0 → 3.29.0 plus matching perps/Klear/AsyncAPI updates. Ships as v13.0.0 because
Fill,MarketPosition,Settlement, and the WSFillPayload/UserOrdersPayloadgained a requiredexchange_index(same constructor-breaking precedent as v12.0.0).Breaking
Fill.exchange_index,MarketPosition.exchange_index,Settlement.exchange_index(int, required). Live list callers are unaffected. Tests/mocks that construct these models must pass the shard (typically0).FillPayload.exchange_indexandUserOrdersPayload.exchange_index(requiredint).Added
live_data.weather(city, *, from_ts, to, last_sec, detailed)— published weather index timeseries.from_tsis the specfromquery.portfolio.target_balance_allocation()/set_target_balance_allocation(...).orders.cancel_all_v2(*, subaccount)— cancel up to 10,000 resting event orders (204).perps.portfolio(cross + isolated).orders.cancel_all(*, subaccount).asset_classon IM-cap methods (mutually exclusive withmarket_ticker).settlement_prices()andestimate_maintenance_margin().GetApiKeysResponse.api_key_region_expiration_ts,IncentiveProgram.max_reward_per_account,MarginReport.snapshot_ts.Spec notes
POST /portfolio/intra_exchange_instance_transfer.GET /margin/large_trader_positions.Verification
uv run ruff check .— cleanuv run mypy kalshi/— cleanuv run pytest tests/ -m "not integration" --ignore=tests/integration— 4331 passed, 3 skipped