You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* polish(resources): communications status Literal; V2 batch bytes fast-path
#324: CommunicationsResource.list_rfqs / list_quotes (sync + async, plus
list_all variants) declared 'status: str | None', the only paginated list
on the SDK that did not narrow its status filter. The spec defines closed
enums (RFQ.status: open|closed; Quote.status: open|accepted|confirmed|
executed|cancelled) and the README advertises 'Literal types on fixed-enum
kwargs' as a headline feature. Add RfqStatusLiteral / QuoteStatusLiteral
to kalshi.models.communications, re-export from kalshi.models + kalshi,
and narrow the eight status kwargs. Pure type-system fence, no runtime
behavior change — typos now surface at the call site under mypy / IDE
autocomplete instead of silently round-tripping.
#329: batch_create_v2 / batch_cancel_v2 (sync + async) still serialized
via request.model_dump(mode='json') -> _post(json=dict) /
_delete_with_body(json=dict), paying the dict-walk pass that httpx's
'json=' encoder repeats — exactly the cost #223 measured and removed for
V1 batch_create / batch_cancel. Add _build_batch_create_v2_body /
_build_batch_cancel_v2_body next to the V1 builders (model_dump_json +
.encode()) and route the V2 methods through _post_json /
_delete_with_body_json with content=<bytes>. V2 is the spec-recommended
surface for new code, so leaving the perf regression on it would
regress #223's own contract.
Closes#324, #329
* polish(resources): inline trivial V2 helpers; trim docstrings; async status flow tests
0 commit comments