Skip to main content

Cancel Order

Requests cancellation of one order. Cancellation is asynchronous: the call forwards the request and answers immediately with the order still in its previous state.

DELETE/api/orders/{id}Auth: Required

Path Parameters

idnumberRequired

The order to cancel.

Response

200, carrying the order — but still in its previous state, normally wait. The response is an acknowledgement that the cancellation was sent, not that it happened.

Errors

Beyond the shared errors:

CodeMeaning
1001No order with this id belongs to your account
2005The order cannot be cancelled — it is a market order, it is not in a cancellable state, or the core refused. The message says which

A market order is not cancellable, so 2005 is the expected answer for one.

The response is not confirmation

DELETE answers with state: "wait" — the order as it was. Do not treat that as a cancelled order.

Confirmation arrives as an order webhook carrying the terminal state:

  • a limit order becomes cancel;
  • a market order becomes fail.

If you are not consuming webhooks, poll Get Order until the state changes.