(V0.1) Cancel all of the calling account's resting orders on one instrument.
POST/v1/orders/cancel_all
Cancels every resting order the calling account holds on a single
instrument_id. instrument_id is REQUIRED — V0.1 mass cancel is deliberately
per-instrument; there is no all-instruments / account-wide kill form, and it does
not enter a kill-switch state (spec §6.6).
Backed by a single MassCancel SBE event. The sweep itself is asynchronous:
a deep book may take a while to drain, so this endpoint returns 202 Accepted
immediately rather than blocking. The engine then, in one sequenced apply pass:
- emits one
OrderCanceledper affected order — each lands in the auditorderstable (soGET /v1/orders/{order_id}reflects the cancellation) and drives the publicorderbook_deltaWS channel; then - emits a terminating
MassCancelComplete, surfaced on the authenticatedaccountWS channel as amass_cancel_completeevent carrying the authoritativecanceled_count.
Correlate the 202 response with the WS completion event via the shared
correlation_id. estimated_count is a best-effort hint taken from the live engine
snapshot at request time; the WS event carries the actual count.
V0.1 reference: market_maker/PLAN.md §16.2 item 5.
Request
Responses
- 202
- 400
- 401
- 403
Mass-cancel sequenced; per-order cancels + completion arrive via WS.
Missing or invalid instrument_id.
Missing or invalid Authorization header.
Account state forbids cancellation (requires an active account).