Skip to content

feat(perps): corporate action payment history + 2026-11-26 spec sync (#590) — 22.17.0 - #591

Merged
TexasCoding merged 2 commits into
mainfrom
fix/590-perps-corporate-action-payment-history
Nov 26, 2026
Merged

TexasCoding merged 2 commits into
mainfrom
fix/590-perps-corporate-action-payment-history

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

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 new GET /margin/corporate_action_payment_history. Release 22.17.0 (minor, additive only).

Changes

  • Perps margin.corporate_action_payment_history(*, start_date, end_date, ticker=, subaccount=) (sync + async), auth required. New models MarginCorporateActionPaymentHistoryEntry and GetMarginCorporateActionPaymentHistoryResponse (null list becomes []). Registered in METHOD_ENDPOINT_MAP and PERPS_CONTRACT_MAP.
  • Perps MarginMarketStatus / MarginMarketStatusLiteral gain finalized. The spec renamed closed to finalized; closed is kept so existing code doesn't break.
  • Core portfolio.positions / positions_all take keyword-only sort_by="event_ticker", sent only when set.
  • Perps WS exchange_status channel: models, dispatch, PerpsChannel.EXCHANGE_STATUS, subscribe_exchange_status().
  • Docs: core OpenAPI 3.37.0 → 3.38.0, perps REST count 54 → 55, and description-only updates (PnL before fees, isolated subaccounts 64–4095, bid/ask placeholders, contract size, per-contract price, trigger count).
  • Version bump 22.17.0 (pyproject.toml, kalshi/__init__.py, CHANGELOG.md).

Blast radius (by hand, since GitNexus isn't installed)

  • New methods and models are additive. Nothing existing was renamed or removed.
  • Widening MarginMarketStatusLiteral is a superset. Code that matches on status exhaustively may now see finalized.
  • _positions_params gained a sort_by argument. It's internal, and both its callers (sync and async positions / positions_all) were updated.
  • WS dispatch gained one new message type. Existing channels are unchanged.
  • kalshi/_generated/ is unchanged by regeneration, and site/ wasn't touched.

Gates

@TexasCoding
TexasCoding merged commit c08806c into main Nov 26, 2026
6 checks passed
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-11-25)

1 participant