Skip to content

Reconcile OpenAPI 3.30.0 spec drift (v15.0.0) - #518

Merged
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-515-517
Sep 20, 2026
Merged

TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-515-517

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

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). The category filter on series.list() matches any entry. Live list callers are unaffected; tests/mocks that construct Series must pass categories.
  • GetTargetBalanceAllocationResponse.resting_margin_reservation ("max" / "sum", required). The GET now echoes the reservation policy previously write-only on set_target_balance_allocation.
  • Perps MarginMarket.underlying_multiplier (str, required) — underlying units per contract-size unit.
  • WS QuoteCreatedPayload.rfq_creator_id and QuoteAcceptedPayload.rfq_creator_id (str, required). Live stream callers are unaffected.

Added

  • FCM subtrader admin on 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.
  • Optional CreateRFQRequest.target_cost_excludes_fees (and the same field on RFQ / Quote responses).
  • Optional min_ts= on historical.fills / fills_all / orders / orders_all.
  • Optional MarginMarket.product_metadata.
  • Klear estimate_maintenance_margin_metadata(asset_class=, date=), funding_estimate_by_asset_class(), funding_schedule(asset_class=).
  • Perps WS UpdateSubscriptionAction.get_snapshot — request a fresh orderbook snapshot without changing the subscription. get_snapshot does not persist market_tickers onto the subscription.
  • Optional id on orderbook snapshot envelopes (core + perps) when the snapshot is a get_snapshot reply.

Changed (non-breaking)

  • Perps WS ListSubscriptionsResponse.id is optional (spec dropped it from required).
  • OkMsg accepts optional index_ids / underlying_tickers on subscribed-indices / subscribed-underlyings acks.

Spec notes

  • Core OpenAPI 3.30.0: 116 operations / 115 mapped. Still unimplemented on the core client: POST /portfolio/intra_exchange_instance_transfer.
  • Perps OpenAPI: 48 operations.
  • Perps SCM: 24 → 27 operations. Still unimplemented: GET /margin/large_trader_positions.
  • AsyncAPI still 15 channels. 12 typed subscribe_* helpers.

Test plan

  • uv run pytest tests/ --ignore=tests/integration -q — 4509 passed, 3 skipped
  • uv run ruff check on changed files — clean
  • uv run mypy kalshi/ — clean
  • New endpoints registered in METHOD_ENDPOINT_MAP / PERPS_SCM_METHOD_ENDPOINT_MAP and BODY_MODEL_MAP

Notes for reviewers

  • GitNexus pre-edit impact: MEDIUM on Series, CreateRFQRequest, MarginMarket, GetTargetBalanceAllocationResponse, QuoteCreatedPayload, UpdateSubscriptionAction; LOW on FcmResource / Klear MarginResource method additions. No HIGH/CRITICAL symbol-level warnings. detect_changes reports CRITICAL at the whole-diff level because this is a spec-wide reconcile (same class of change as v13/v14).
  • Version bump is major solely for constructor-required fields; live list/stream callers are unaffected.

Closes #515. Closes #517. Vendors OpenAPI 3.29.0 → 3.30.0 plus matching
perps/Klear/AsyncAPI updates. Breaking for constructors of Series,
GetTargetBalanceAllocationResponse, MarginMarket, and WS quote
created/accepted payloads that omit newly required fields.
@TexasCoding
TexasCoding merged commit d5a350a into main Sep 20, 2026
6 checks passed
@TexasCoding
TexasCoding deleted the fix/spec-drift-515-517 branch September 20, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spec drift 2026-09-14: openapi 3.29.0 → 3.30.0 (paths 96→96, fp aeabe1d8) Nightly spec-drift: strict contract tests failing (since 2026-09-09)

1 participant