Skip to content

Reconcile OpenAPI 3.29.0 spec drift (v13.0.0) - #509

Merged
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-507-508
Aug 28, 2026
Merged

Reconcile OpenAPI 3.29.0 spec drift (v13.0.0)#509
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-507-508

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

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 WS FillPayload / UserOrdersPayload gained a required exchange_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 (typically 0).
  • WS FillPayload.exchange_index and UserOrdersPayload.exchange_index (required int).

Added

  • live_data.weather(city, *, from_ts, to, last_sec, detailed) — published weather index timeseries. from_ts is the spec from query.
  • portfolio.target_balance_allocation() / set_target_balance_allocation(...).
  • orders.cancel_all_v2(*, subaccount) — cancel up to 10,000 resting event orders (204).
  • Perps exit triggers on perps.portfolio (cross + isolated).
  • Perps orders.cancel_all(*, subaccount).
  • Perps FCM optional asset_class on IM-cap methods (mutually exclusive with market_ticker).
  • Klear settlement_prices() and estimate_maintenance_margin().
  • Optional GetApiKeysResponse.api_key_region_expiration_ts, IncentiveProgram.max_reward_per_account, MarginReport.snapshot_ts.

Spec notes

  • Core OpenAPI 3.29.0: 108 operations / 107 mapped. Still unimplemented on the core client: POST /portfolio/intra_exchange_instance_transfer.
  • Perps OpenAPI: 38 → 47 operations.
  • Perps SCM: 17 → 19 operations. Still unimplemented: GET /margin/large_trader_positions.
  • AsyncAPI still 14 channels.

Verification

  • uv run ruff check . — clean
  • uv run mypy kalshi/ — clean
  • uv run pytest tests/ -m "not integration" --ignore=tests/integration4331 passed, 3 skipped

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.
@TexasCoding
TexasCoding merged commit 16c0b83 into main Aug 28, 2026
6 checks passed
@TexasCoding
TexasCoding deleted the fix/spec-drift-507-508 branch August 28, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant