DELETE
/
api
/
v1
/
orders
curl --request DELETE \
  --url https://order.sandbox.rails.xyz/api/v1/orders \
  --header 'Authorization: Bearer <token>'
{
  "message": "Cancelling 1 order for market ETH-USD without any errors"
}
For order cancellations, we recommend using the Cancel Order by ID websocket instead of this endpoint. A 200 response from this endpoint only indicates that your request has been received and processing has begun; it does not guarantee the successful cancellation of all orders.

If you prefer using this endpoint for its convenience, there are three ways to make sure that all orders have been cancelled successfully:

  1. Call the endpoint again and check if “Cancelling 0 orders” is included in the response message.
  2. Call the Get Account Open Orders endpoint to check if the orders are still there.
  3. Include an optional clientRequestId query parameter to uniquely identify the request and subscribe to the Order Creation websocket for notifications (one notification per order). The notification message is similar to the response for Cancel Order by Price websocket.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

market
string
required

To get all supported markets, call /api/v1/markets endpoint. To cancel orders across all markets, use the value all.

clientRequestId
string

The client request ID must be a UUID and is used to uniquely identify the request. If not provided, a random UUID will be generated.

Response

200
application/json
Success
message
string