Cancel one order
operationId: cancelOrder
The order must belong to a firm-scoped account. It moves to CANCELLING, then CANCELLED when the venue acks. If a fill races the cancel, terminal status may be FILLED.
Response — 200 OK
409 if the order is already terminal. Confirm with GET /v1/orders/{order_id} or the orders.cancelled event.
Cancel all working orders
operationId: cancelAllOrders
Cancels every order currently working on the account (SUBMITTED, PARTIALLY_FILLED, and other non-terminal states the OMS still treats as cancellable). Open positions are untouched.
Response — 200 OK
cancelled_count is how many cancels were accepted. errors lists per-order failures ("{order_id}: {reason}"). A 200 with a non-empty errors array is a partial cancel — retry or inspect the listed IDs.
Flatten an account
operationId: flattenAccount
Cancels working orders, then submits IOC market orders that offset each open position. Use this for a single-account emergency exit.
Body
Response — 200 OK
Flatten returns when the OMS has issued the cancels and close orders. It does not wait for venue fills or return the resulting position book. After
200, read open positions until they are flat, and/or wait for positions.closed on firm-ws or webhooks.
Close positions only
account_id). Submits offset market orders and does not cancel working orders. Use when resting entries should stay while you exit current exposure.
Close one position
operationId: closePosition
Submits one reduce-only IOC market order that offsets the open net for a single instrument. Other positions stay open. Working orders are not cancelled.
Body
An optional
Idempotency-Key header makes a retry return the same close instead of submitting a second offset.
Response — 200 OK
closed_count is offset orders submitted, not fills confirmed. A non-empty errors list means the close was not submitted. 404 means that account has no open position in that instrument.

