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
{{ message }}
Repository navigation
_delete_with_body lacks a params kwarg that _delete_with_body_json already accepts #340
The bytes-fast-path sibling _delete_with_body_json accepts a params: dict[str, Any] | None = None kwarg; the dict-based _delete_with_body does not, and silently drops any query params if a caller tries to add one. Both helpers exist for the same DELETE-with-body shape, so the asymmetry is purely accidental. AsyncResource mirrors the same gap.
Concrete consequence: batch_cancel_v2 currently uses _delete_with_body; if the spec ever adds a query param to /portfolio/events/orders/batched (subaccount default, exchange_index, etc.), the implementation can't route it without first plumbing params through. Tightening the helper now prevents the next contributor from re-introducing the gap.
Evidence
kalshi/resources/_base.py:256-273 (SyncResource._delete_with_body, no params):
Add params: dict[str, Any] | None = None to both SyncResource._delete_with_body and AsyncResource._delete_with_body, threading it into self._transport.request(..., params=params, ...). No public-API change; no caller change required today.
Activity
polish(transport): async close cancellation-safe + _delete_with_body …