{
  "message": "cancelOrder",
  "content": {
    "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
    "orderId": "01HH0X2VD6R0CJE4X0P0D1NQ11",
    "cancelBy": "orderId"
  }
}
// Request received successfully
{
  "resultType": "cancelOrder",
  "data": {
    "statusCode": 202,
    "body": "cancelling order",
    "order": {
        "userId": "1cf96e01-fa22-4b3a-8dff-599d1cb45c78",
        "orderId": "01HZ5J70FCBNJAS7TVPVB4GAAG",
        "market": "ETH-USD",
        "orderType": "buy",
        "tradeType": "limit",
        "orderStatus": "cancelling",
        "price": "3601",
        "quantity": "1",
        "filledQuantity": "0",
        "leverage": "1",
        "updatedAt": 1717100393492,
        "createdAt": 1717100052972,
        "reduceOnly": false,
        "postOnly": false    
    },
    "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285"
  },
  "connectionId": "KNal9ekeCYcCIBA="
}

We enforce a rate limit of 6000 requests per minute for the createOrder and cancelOrder requests. This limit is shared across all markets and both endpoints. If you exceed this limit, you will receive a 429 Too Many Requests response.

Unique Client Request ID

For the current WebSocket request, you can optionally include a unique client request ID in the request body. The same client request ID will be found in the response and is used to match the response to the request. The client request ID must be a UUID.

Order Quantity Fields

In the order object, quantity represents the remaining quantity and filledQuantity represents the cumulative filled quantity. The two values will add up to the original order quantity.

Conflict And Retry

When you get 409 status code, it means that the order was in the process of being filled at the time of cancellation. Please retry the cancellation request if you get this status code.

Acknowledgment And Confirmation

When you cancel an order, you will first receive a response to acknowledge that the request has been received. Then you will receive another response to confirm that the order has been successfully cancelled.

There are three differences between these two responses:

AcknowledgmentConfirmation
Bodycancelling orderorder cancelled
Order Statuscancellingcancelled
Status Code202200

URL

This stream can be subscribed per market and you will need to pass in the market in the URL query. See below.

Query params

market
string
required

Example value: ETH-USD. To get all supported markets, call /api/v1/markets endpoint.

Headers

See Authorization section on how to retrieve authorization token. Once token is received, set Sec-WebSocket-Protocol headers in the WebSocket handshake request or on connect().

Sec-WebSocket-Protocol
string
required

Example value (authorization token) :

authorization#eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdGFnaW5nLmZ1bmdpYmxlLnh5eiIsInN1YiI6ImQxM2I1MzBmLWFmNzMtNDBmOS04ZjhlLWVkNzk1OTU3YTU3ZiIsImF1ZCI6WyJzdGFnaW5nLWFwcC5mdW5naWJsZS54eXoiXSwiZXhwIjoxNzAzMzA1NzQwLCJpYXQiOjE3MDMzMDM5NDB9.vsHe4G_yEkRfz8XNoTKcX83udA-LUysWD4q80wfCC8k
{
  "message": "cancelOrder",
  "content": {
    "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
    "orderId": "01HH0X2VD6R0CJE4X0P0D1NQ11",
    "cancelBy": "orderId"
  }
}
// Request received successfully
{
  "resultType": "cancelOrder",
  "data": {
    "statusCode": 202,
    "body": "cancelling order",
    "order": {
        "userId": "1cf96e01-fa22-4b3a-8dff-599d1cb45c78",
        "orderId": "01HZ5J70FCBNJAS7TVPVB4GAAG",
        "market": "ETH-USD",
        "orderType": "buy",
        "tradeType": "limit",
        "orderStatus": "cancelling",
        "price": "3601",
        "quantity": "1",
        "filledQuantity": "0",
        "leverage": "1",
        "updatedAt": 1717100393492,
        "createdAt": 1717100052972,
        "reduceOnly": false,
        "postOnly": false    
    },
    "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285"
  },
  "connectionId": "KNal9ekeCYcCIBA="
}