Skip to content

fix(spec-drift): OpenAPI 3.26.0 historical positions + Klear settlement (v7.3.0) - #485

Merged
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-484-historical-positions
Jul 24, 2026
Merged

fix(spec-drift): OpenAPI 3.26.0 historical positions + Klear settlement (v7.3.0)#485
TexasCoding merged 1 commit into
mainfrom
fix/spec-drift-484-historical-positions

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

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/positions for settled market positions archived to the historical DB. Returns PositionsResponse (same shape as portfolio). Query params: limit, cursor, ticker, event_ticker only (no count_filter / subaccount). Auth required.
  • HistoricalCutoff.market_positions_last_updated_ts (AwareDatetime | None) — archival boundary for historical positions.
  • Klear SCMomitted_subtrader_count (int | None) on GetSettlementEstimateResponse and AssetClassSettlementEstimate.
  • Contract map registration for the new endpoint; unit + integration tests.
  • Docs: README/index operation counts, historical resource docs, migration notes, CHANGELOG, ROADMAP.
  • Local OpenAPI pin 3.25.0 → 3.26.0 (103 ops / 102 mapped; POST /portfolio/intra_exchange_instance_transfer still 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 -q
  • Contract registration via METHOD_ENDPOINT_MAP for GET /historical/positions
  • uv run pytest tests/test_contracts.py -q (CI)
  • uv run mypy kalshi/ (CI)
  • Nightly spec-drift suite green after merge

Closes #484

…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/
@TexasCoding
TexasCoding merged commit 4ee8941 into main Jul 24, 2026
6 checks passed
@TexasCoding
TexasCoding deleted the fix/spec-drift-484-historical-positions branch July 24, 2026 00:04
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-07-22)

1 participant