Context
Backfills remaining spec v3.18.0 fields on the RFQ/Quote (communications) and OrderGroup surfaces. Closes the response-side drift on the kalshi.models.communications.* and kalshi.models.order_groups.* models.
Depends on #158. Independent of #159, #160, #PR4 — can land in parallel.
Scope
Files
kalshi/models/communications.py — add 1 to RFQ, 3 to Quote
kalshi/models/order_groups.py — add 1 to OrderGroup, 1 to GetOrderGroupResponse, 2 to CreateOrderGroupResponse
- Tests: extend the existing communications + order_groups test suites
Field-level changes
communications.RFQ (+1):
| Field |
Spec type |
SDK type |
Notes |
creator_subaccount |
integer |
int | None = None |
subaccount index of the RFQ creator |
communications.Quote (+3):
| Field |
Spec type |
SDK type |
Notes |
creator_subaccount |
integer |
int | None = None |
quote creator's subaccount |
post_only |
boolean |
bool | None = None |
mirrors CreateQuoteRequest.post_only (already on the request side from v2.1.0) |
rfq_creator_subaccount |
integer |
int | None = None |
RFQ creator's subaccount, surfaced on the quote |
order_groups.OrderGroup (+1):
| Field |
Spec type |
SDK type |
Notes |
exchange_index |
integer |
int | None = None |
mirrors Market/Order/Event |
order_groups.GetOrderGroupResponse (+1):
| Field |
Spec type |
SDK type |
Notes |
exchange_index |
integer |
int | None = None |
|
order_groups.CreateOrderGroupResponse (+2):
| Field |
Spec type |
SDK type |
Notes |
exchange_index |
integer |
int | None = None |
|
subaccount |
integer |
int | None = None |
server echoes the subaccount the group was created against |
Conventions
Same as #159, #160.
Acceptance criteria
Notes
Quote.post_only is a server echo of the value passed on CreateQuoteRequest — verify in the spec that it returns on Quote (not just on CreateQuoteResponse). Should mirror.
CreateOrderGroupResponse.subaccount is distinct from CreateOrderGroupResponse.exchange_index. Both are surfaced together because the server echoes the routing context.
Effort
~30 lines model code + ~15 lines tests.
Part of the response-side spec drift hardening stack.
Tracking: #157.
Context
Backfills remaining spec v3.18.0 fields on the RFQ/Quote (
communications) and OrderGroup surfaces. Closes the response-side drift on thekalshi.models.communications.*andkalshi.models.order_groups.*models.Depends on #158. Independent of #159, #160, #PR4 — can land in parallel.
Scope
Files
kalshi/models/communications.py— add 1 toRFQ, 3 toQuotekalshi/models/order_groups.py— add 1 toOrderGroup, 1 toGetOrderGroupResponse, 2 toCreateOrderGroupResponseField-level changes
communications.RFQ(+1):creator_subaccountint | None = Nonecommunications.Quote(+3):creator_subaccountint | None = Nonepost_onlybool | None = NoneCreateQuoteRequest.post_only(already on the request side from v2.1.0)rfq_creator_subaccountint | None = Noneorder_groups.OrderGroup(+1):exchange_indexint | None = Noneorder_groups.GetOrderGroupResponse(+1):exchange_indexint | None = Noneorder_groups.CreateOrderGroupResponse(+2):exchange_indexint | None = Nonesubaccountint | None = NoneConventions
Same as #159, #160.
Acceptance criteria
tests/test_contracts.py::TestSpecDrift::test_additive_drift[RFQ]tests/test_contracts.py::TestSpecDrift::test_additive_drift[Quote]tests/test_contracts.py::TestSpecDrift::test_additive_drift[OrderGroup]tests/test_contracts.py::TestSpecDrift::test_additive_drift[GetOrderGroupResponse]tests/test_contracts.py::TestSpecDrift::test_additive_drift[CreateOrderGroupResponse]uv run pytest tests/ -q --ignore=tests/integrationpasses.uv run mypy kalshi/strict-clean.uv run ruff check .clean.Notes
Quote.post_onlyis a server echo of the value passed onCreateQuoteRequest— verify in the spec that it returns onQuote(not just onCreateQuoteResponse). Should mirror.CreateOrderGroupResponse.subaccountis distinct fromCreateOrderGroupResponse.exchange_index. Both are surfaced together because the server echoes the routing context.Effort
~30 lines model code + ~15 lines tests.
Part of the response-side spec drift hardening stack.
Tracking: #157.