Reconcile OpenAPI 3.28.0 spec drift (v12.0.0) - #505
Merged
Conversation
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.
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 #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
TotalRestingOrderValuegained a required field (same constructor-breaking precedent as v11.0.0).Breaking
TotalRestingOrderValue.resting_order_value_breakdown(list[IndexedBalance], required). Liveportfolio.total_resting_order_value()callers are unaffected. Tests/mocks that construct the model must pass the list (empty is valid). Each row's.balanceis aDollarDecimal, not integer cents.Added
exchange_indexquery filter onorders.list/list_all,portfolio.positions/positions_all, andportfolio.fills/fills_all(plus the deprecatedorders.fillsaliases). Omit to return every shard.fcm.risk_controls(),update_risk_controls(),delete_risk_controls()(sync + async).MarketSettlementEstimate.session_avg_price_fp(optional).Spec notes
POST /portfolio/intra_exchange_instance_transfer.Verification
uv run ruff check .— cleanuv run mypy kalshi/— cleanuv run pytest tests/ -m "not integration" --ignore=tests/integration— 4217 passed, 3 skipped