Repository navigation
feat(perps): corporate action payment history + 2026-11-26 spec sync (#590) — 22.17.0 - #591
Merged
TexasCoding merged 2 commits intoNov 26, 2026
Merged
Conversation
…on payment history, exchange_status WS)
…ange_status WS; positions sort_by (#590) — 22.17.0
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 #590
Reconciles the 2026-11-25 nightly spec drift. The strict contract suite failed on
test_every_spec_endpoint_is_mapped[perps]because of the newGET /margin/corporate_action_payment_history. Release 22.17.0 (minor, additive only).Changes
margin.corporate_action_payment_history(*, start_date, end_date, ticker=, subaccount=)(sync + async), auth required. New modelsMarginCorporateActionPaymentHistoryEntryandGetMarginCorporateActionPaymentHistoryResponse(null list becomes[]). Registered inMETHOD_ENDPOINT_MAPandPERPS_CONTRACT_MAP.MarginMarketStatus/MarginMarketStatusLiteralgainfinalized. The spec renamedclosedtofinalized;closedis kept so existing code doesn't break.portfolio.positions/positions_alltake keyword-onlysort_by="event_ticker", sent only when set.exchange_statuschannel: models, dispatch,PerpsChannel.EXCHANGE_STATUS,subscribe_exchange_status().pyproject.toml,kalshi/__init__.py,CHANGELOG.md).Blast radius (by hand, since GitNexus isn't installed)
MarginMarketStatusLiteralis a superset. Code that matches on status exhaustively may now seefinalized._positions_paramsgained asort_byargument. It's internal, and both its callers (sync and asyncpositions/positions_all) were updated.kalshi/_generated/is unchanged by regeneration, andsite/wasn't touched.Gates
uv run ruff check .passeduv run mypy kalshi/passeduv run pytest tests/ --ignore=tests/integration -q: 5479 passed, 3 skippeduv run pytest tests/test_contracts.py -W error::UserWarning: 1006 passed (the failure from Nightly spec-drift: strict contract tests failing (since 2026-11-25) #590 now passes)