Skip to content

Reconcile OpenAPI 3.28.0 spec drift (v12.0.0) - #505

Merged
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-503
Aug 16, 2026
Merged

Reconcile OpenAPI 3.28.0 spec drift (v12.0.0)#505
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-503

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

Closes #503.

Reconciles nightly spec-drift against upstream OpenAPI 3.27.0 → 3.28.0 plus matching perps/SCM updates. Ships as v12.0.0 because TotalRestingOrderValue gained a required field (same constructor-breaking precedent as v11.0.0).

Breaking

  • TotalRestingOrderValue.resting_order_value_breakdown (list[IndexedBalance], required). Live portfolio.total_resting_order_value() callers are unaffected. Tests/mocks that construct the model must pass the list (empty is valid). Each row's .balance is a DollarDecimal, not integer cents.

Added

  • Optional exchange_index query filter on orders.list / list_all, portfolio.positions / positions_all, and portfolio.fills / fills_all (plus the deprecated orders.fills aliases). Omit to return every shard.
  • Perps FCM IM caps: fcm.risk_controls(), update_risk_controls(), delete_risk_controls() (sync + async).
  • Klear MarketSettlementEstimate.session_avg_price_fp (optional).

Spec notes

  • Core OpenAPI 3.28.0: 104 operations / 103 mapped. Still unimplemented on the core client: POST /portfolio/intra_exchange_instance_transfer.
  • Perps OpenAPI: 35 → 38 operations (FCM risk-control GET/PUT/DELETE).
  • AsyncAPI unchanged.

Verification

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

Closes #503. Adds exchange_index filters on orders/positions/fills,
required TotalRestingOrderValue.resting_order_value_breakdown, perps
FCM risk-control endpoints, and Klear session_avg_price_fp.
@TexasCoding
TexasCoding merged commit aa89cf5 into main Aug 16, 2026
6 checks passed
@TexasCoding
TexasCoding deleted the fix/spec-drift-503 branch August 16, 2026 20:21
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.

Nightly spec-drift: strict contract tests failing (since 2026-08-11)

1 participant