Cancel order by id [Private]

Cancel an open order. Returns a success message if the target order was canceled as a result.

This is a private route, so the api-key parameter should be sent in the header.

Data dictionary

NameTypeParameter typeRequiredRangeDescription
orderIdstringBODYYES-Should be a unique order id. For example, c7fc5b2b-bd9d-48c1-a458-a83412669cf4

Exemplary request

First you will need to create a new order using Create a new order endpoint.
Send the UUID of the created order in the body of the cancel request {{baseURL}}/v4/order/private/cancel:

    "orderId": "{{OPEN_ORDER_ID}}"

Response structure

In case the order is closed successfully, you will receive a JSON with data object, structured like this example:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

    "success": true


StatusError codeMessageParameterDescription
500WrongRequestExceptionorderId must be a UUIDorderIdThe order id should match UUID pattern, for example, c7fc5b2b-bd9d-48c1-a458-a83412669cf4
500Internal Server ErrorInvalid JSON-Expected a valid JSON in the body of request, but received something else. Recommend checking the structure, e.g. key-value pairs, quotes, etc.
400BAD_REQUESTOrder with status Closed can't be canceled-The order you tried to cancel has already been closed/traded
400BAD_REQUESTOrder with status Canceled can't be canceled-The order you tried to cancel has already been canceled
500CANCEL_ORDER_FAILEDOrder with id: {id} already has been processed or canceled.
Check status again and if not status not changed, please contact support
-The order cannot be canceled at this time. It may have already been cancelled or there was an error in cancelling it.
Click Try It! to start a request and see the response here!