Reconcile OpenAPI 3.30.0 spec drift (v15.0.0) - #518
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 #515. Closes #517.
Reconciles nightly spec-drift against upstream OpenAPI 3.29.0 → 3.30.0 (paths 96 → 99; 109 → 116 operations) plus matching perps, Klear, and AsyncAPI updates. Ships as v15.0.0 because several response/WS payload constructors gained required fields (same constructor-breaking precedent as v13/v14).
Breaking
Series.categories(list[str], required). Thecategoryfilter onseries.list()matches any entry. Live list callers are unaffected; tests/mocks that constructSeriesmust passcategories.GetTargetBalanceAllocationResponse.resting_margin_reservation("max"/"sum", required). The GET now echoes the reservation policy previously write-only onset_target_balance_allocation.MarginMarket.underlying_multiplier(str, required) — underlying units per contract-size unit.QuoteCreatedPayload.rfq_creator_idandQuoteAcceptedPayload.rfq_creator_id(str, required). Live stream callers are unaffected.Added
client.fcm:list_subtraders()/create_subtrader(subtrader_suffix=...),blocked_categories/update_blocked_categories,event_contract_daily_cap/update_event_contract_daily_cap/delete_event_contract_daily_cap.CreateRFQRequest.target_cost_excludes_fees(and the same field onRFQ/Quoteresponses).min_ts=onhistorical.fills/fills_all/orders/orders_all.MarginMarket.product_metadata.estimate_maintenance_margin_metadata(asset_class=, date=),funding_estimate_by_asset_class(),funding_schedule(asset_class=).UpdateSubscriptionAction.get_snapshot— request a fresh orderbook snapshot without changing the subscription.get_snapshotdoes not persistmarket_tickersonto the subscription.idon orderbook snapshot envelopes (core + perps) when the snapshot is aget_snapshotreply.Changed (non-breaking)
ListSubscriptionsResponse.idis optional (spec dropped it from required).OkMsgaccepts optionalindex_ids/underlying_tickerson subscribed-indices / subscribed-underlyings acks.Spec notes
POST /portfolio/intra_exchange_instance_transfer.GET /margin/large_trader_positions.subscribe_*helpers.Test plan
uv run pytest tests/ --ignore=tests/integration -q— 4509 passed, 3 skippeduv run ruff checkon changed files — cleanuv run mypy kalshi/— cleanMETHOD_ENDPOINT_MAP/PERPS_SCM_METHOD_ENDPOINT_MAPandBODY_MODEL_MAPNotes for reviewers
Series,CreateRFQRequest,MarginMarket,GetTargetBalanceAllocationResponse,QuoteCreatedPayload,UpdateSubscriptionAction; LOW onFcmResource/ KlearMarginResourcemethod additions. No HIGH/CRITICAL symbol-level warnings.detect_changesreports CRITICAL at the whole-diff level because this is a spec-wide reconcile (same class of change as v13/v14).