market_id to scope the cancel to
a single market.
Parameters
When
Some, cancel only orders on this market. When None, cancel all open
orders across every market.Returns
The set of orders that were successfully cancelled. Failed cancels are
logged at
WARN and omitted from the result on Polymarket; Kalshi includes
per-order error entries from /portfolio/orders/batched and they are
filtered out of the unified return.Kalshi is a two-step flow: list resting orders (paginated) then
DELETE /portfolio/orders/batched with the collected IDs. There is no
single “cancel all” verb.Polymarket currently iterates cancel_order per open order. The
CLOB has native DELETE /cancel-all and DELETE /cancel-market-orders
endpoints; switching to those is a planned follow-up once the V2 SDK
exposes them.
