v2.2.0
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
Marketgains 11 spec fields,Ordergains 8,Fillgains 4 (#159).Eventgains 3,EventMetadata2,Settlement1,Trade2,
IncentiveProgram1 (#160).RFQgains 1,Quote3,OrderGroup1,GetOrderGroupResponse1,
CreateOrderGroupResponse2 (#161).- 33 fields across 11 WebSocket payload models (#162) — Unix-ms
timestamps (*_ts_ms),outcome_side/book_sidedirection
encoding, MVE linkage, and RFQ/Quote context echoes. ErrorPayloadregistered inWS_CONTRACT_MAPso 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_dollarsto ship missing in v2.1.0 across five
rounds of review. Intentional deviations require an entry in
EXCLUSIONS(tests/_contract_support.py) with a typedkindand
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 aValidationErrorbecause seven
request-side model fields carried ale=32bound derived from spec
prose. The actual OpenAPI schema defines no upper bound; only the
description text mentions1-32. Affected fields:
ApplySubaccountTransferRequest.{from,to}_subaccount,
UpdateSubaccountNettingRequest.subaccount_number,
CreateOrderRequest.subaccount,
BatchCancelOrdersV2RequestOrder.subaccount,
CreateRFQRequest.subaccount,
CreateQuoteRequest.subaccount.
Thege=0lower bound is unchanged. Unblocks the
test_transfer_between_subaccountsnightly integration test (#164).