fix(spec-drift): OpenAPI 3.26.0 historical positions + Klear settlement (v7.3.0) - #485
Merged
Merged
Conversation
…nt fields Add GET /historical/positions (positions/positions_all sync+async), HistoricalCutoff.market_positions_last_updated_ts, and Klear omitted_subtrader_count on settlement-estimate responses. Bump to 7.3.0; update docs, contract map, unit/integration tests, and local OpenAPI pin 3.25.0 → 3.26.0. Closes #484 Test plan: - uv run pytest tests/test_historical.py tests/perps/klear/test_margin.py tests/test_contracts.py -q - uv run mypy kalshi/
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.
Summary
Closes nightly strict contract drift from OpenAPI 3.25.0 → 3.26.0 (issue #484).
Fixes
historical.positions()/positions_all()(sync + async) —GET /historical/positionsfor settled market positions archived to the historical DB. ReturnsPositionsResponse(same shape as portfolio). Query params:limit,cursor,ticker,event_tickeronly (nocount_filter/subaccount). Auth required.HistoricalCutoff.market_positions_last_updated_ts(AwareDatetime | None) — archival boundary for historical positions.omitted_subtrader_count(int | None) onGetSettlementEstimateResponseandAssetClassSettlementEstimate.POST /portfolio/intra_exchange_instance_transferstill unimplemented).Version bump
7.3.0 — additive only; no breaking public-API changes.
Test plan
uv run pytest tests/test_historical.py tests/perps/klear/test_margin.py -qMETHOD_ENDPOINT_MAPforGET /historical/positionsuv run pytest tests/test_contracts.py -q(CI)uv run mypy kalshi/(CI)Closes #484