Skip to content

feat(perps): is_block_trade on margin trades; Klear report types (#567) — 22.7.0 - #568

Merged
TexasCoding merged 4 commits into
mainfrom
fix/567-block-trade
Nov 3, 2026
Merged

TexasCoding merged 4 commits into
mainfrom
fix/567-block-trade

Conversation

@TexasCoding

Copy link
Copy Markdown
Owner

Closes #567

Spec drift (run 41644653360): perps GET /margin/trades gained is_block_trade query param; MarginTrade / WS marginTradePayload gained is_block_trade; Klear report_type enum gained *_fp variants. Release 22.7.0 (additive, optional).

Changes

  • perps.portfolio.trades / trades_all (sync + async): keyword-only is_block_trade: bool | None = None, sent as "true"/"false" only when not None.
  • MarginTrade.is_block_trade, MarginTradePayload.is_block_trade: optional bool | None (spec-required → PERPS_EXCLUSIONS server_omits_despite_required).
  • MarginReportTypeLiteral: full spec enum (adds *_fp variants plus previously missing base types incl. daily_statement).
  • Specs synced; kalshi/_generated unchanged in effect. Version 22.7.0, CHANGELOG, docs/perps.md.

Blast radius (hand-written; GitNexus unavailable)

  • _margin_trades_params is used only by the 4 perps trades methods; new param defaults to None → identical query for existing callers.
  • New model fields default None; extra="allow" already present → no parsing change for existing payloads.
  • Literal widening only accepts more values; no removals.
  • No request bodies, retries, or core (non-perps) code touched.

Gates

ruff pass · mypy pass · 5072 passed/3 skipped · contracts strict 930 passed

@TexasCoding
TexasCoding merged commit 29b1669 into main Nov 3, 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-03)

1 participant