Skip to content

Trading

Cancel orders

Cancellation is free, best-effort, and idempotent. Today you can cancel one order at a time per request. Bulk cancel โ€” by ID list, by market, or account-wide โ€” is planned; see the workaround below until it ships. A race window exists in all modes: in-flight fills committed before your cancel reaches the matcher will still complete.

Cancel a single order

Send `POST /api/v1/orders/:id/cancel` with the order ID. The response returns the full order with its status set to `cancelled`; repeating the call against an already-cancelled order is idempotent.

POST /api/v1/orders/:id/cancel
Authorization: Bearer $SATORIEX_TOKEN

202 Accepted  -> { "code": 0, "data": { ...full order object with status "cancelled" } }

Bulk cancellation

Planned

Native bulk cancel โ€” a single call to cancel many orders or every order on a market โ€” is on the roadmap but not shipped today.

In the meantime, loop the single-cancel endpoint client-side. Cancellation is free and fast, so a tight loop over your open-order list works well for emergency unwind.

# Today: cancel one order at a time.
for id in "${ORDER_IDS[@]}"; do
  curl -X POST https://staging.satoriex.io/api/v1/orders/$id/cancel \
    -H "Authorization: Bearer $SATORIEX_TOKEN"
done

When the native bulk endpoint ships it will be announced in the changelog. Until then, plan for one HTTP call per order.

What can be cancelled

Order stateCancellable?Notes
pending Yes Flagged for cancel; the matcher skips it on next processing โ€” the order has not yet been added to the book.
open Yes Resting in the book; cancel removes it immediately. This is the common cancel case.
partial Yes (remainder only) Already-filled shares stay in your position; only the unfilled remainder is cancelled.
filled No Already settled โ€” no action possible.
cancelled Idempotent Repeat calls return the same success response.

Cancellations are not retroactive

If your cancel arrives a millisecond after a match, you traded. Build your strategy to tolerate that window โ€” order types are limit-only today; verify open orders after cancellation.