Reconcile OpenAPI 3.29.0 spec drift (v14.0.0) - #512
Merged
Conversation
Closes #510. Closes #511. Adds weather calibrations, FCM-bound API keys, target-balance resting_margin_reservation, FCM client_order_ids, historical subaccount, perps fee_tier_rates, Klear FCM API keys and member funding payments, and WS cfbenchmarks_value_5hz. Breaking: MarginFillPayload and MarginUserOrderPayload require order_source.
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 #510. Closes #511.
Reconciles nightly spec-drift against upstream OpenAPI 3.29.0 content (same
info.version, paths 95 → 96) plus matching perps/Klear/AsyncAPI updates. Ships as v14.0.0 because perps WSMarginFillPayloadandMarginUserOrderPayloadgained a requiredorder_source(same constructor-breaking precedent as v13.0.0).Breaking
MarginFillPayload.order_sourceandMarginUserOrderPayload.order_source(Literal["user", "system"], required).systemmarks liquidations and margin exit / trailing-stop triggers. Live stream callers are unaffected. Tests/mocks that construct these payloads must pass the source (typically"user").Added
live_data.weather_calibrations(city)— published weather-index configuration timeline.WeatherIndexPoint.receipt_basis.api_keys.list(*, fcm_subtrader_id)and optionalfcm_subtrader_idoncreate()/generate()/ApiKey(mutually exclusive withsubaccount). Optionalwarningon create/generate responses.portfolio.set_target_balance_allocation(..., resting_margin_reservation=)(max/sum).fcm.orders/orders_all:subtrader_idoptional whenclient_order_idsis supplied (max 100).subaccountonhistorical.positions()/positions_all().margin.fee_tier_rates().MarginMarket.asset_class.list_fcm_api_keys/create_fcm_api_key/generate_fcm_api_key/delete_fcm_api_key).member_funding_payments()/member_funding_payments_all().estimate_maintenance_margin(..., date=, clearing_type=)plus optional breakdown fields.subscribe_cfbenchmarks_value_5hz().Changed (non-breaking)
Event.available_on_brokersis optional. The spec dropped the field; constructors that pass it still work.Spec notes
POST /portfolio/intra_exchange_instance_transfer.GET /margin/large_trader_positions.cfbenchmarks_value_5hz). 12 typedsubscribe_*helpers.Verification
uv run ruff check .— cleanuv run mypy kalshi/— cleanuv run pytest tests/ -m "not integration" --ignore=tests/integration— 4414 passed, 3 skipped