Skip to content

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 20 May 00:09
· 127 commits to main since this release
2319fee

Response-side spec drift hardening stack (#157). Backfills the remaining
v3.18.0 OpenAPI / v0.14 AsyncAPI fields across REST and WebSocket response
models (65 new optional fields across 16 models), promotes additive
drift from warning to hard CI failure, and lands a high-signal bugfix
for the subaccount-number request constraint that was rejecting valid
server-assigned values.

Added

  • Market gains 11 spec fields, Order gains 8, Fill gains 4 (#159).
  • Event gains 3, EventMetadata 2, Settlement 1, Trade 2,
    IncentiveProgram 1 (#160).
  • RFQ gains 1, Quote 3, OrderGroup 1, GetOrderGroupResponse 1,
    CreateOrderGroupResponse 2 (#161).
  • 33 fields across 11 WebSocket payload models (#162) — Unix-ms
    timestamps (*_ts_ms), outcome_side / book_side direction
    encoding, MVE linkage, and RFQ/Quote context echoes.
  • ErrorPayload registered in WS_CONTRACT_MAP so WS contract coverage
    is complete.

Changed

  • Response-side additive spec drift now hard-fails CI (was a
    warning). Closes the regression path that allowed
    Balance.balance_dollars to ship missing in v2.1.0 across five
    rounds of review. Intentional deviations require an entry in
    EXCLUSIONS (tests/_contract_support.py) with a typed kind and
    reason.
  • Unmapped SDK models (REST + WS) also now hard-fail — same regression
    surface.
  • WS envelope and helper models now use extra="allow", matching the
    WS payload policy from #143. Closes the matching ROADMAP item.
  • Required-but-Optional drift stays as warning-only (~204 entries;
    separate policy decision).

Fixed

  • Subaccount-number request fields no longer cap at 32. Demo allocates
    ephemeral subaccount numbers above 32 (observed: 41), but the SDK was
    rejecting them client-side with a ValidationError because seven
    request-side model fields carried a le=32 bound derived from spec
    prose. The actual OpenAPI schema defines no upper bound; only the
    description text mentions 1-32. Affected fields:
    ApplySubaccountTransferRequest.{from,to}_subaccount,
    UpdateSubaccountNettingRequest.subaccount_number,
    CreateOrderRequest.subaccount,
    BatchCancelOrdersV2RequestOrder.subaccount,
    CreateRFQRequest.subaccount,
    CreateQuoteRequest.subaccount.
    The ge=0 lower bound is unchanged. Unblocks the
    test_transfer_between_subaccounts nightly integration test (#164).