Skip to main content
See rate limit applied to this WebSocket request.

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

Priority of Cancellations

Order cancellations receive the highest priority in our system processing queue. Unlike order creation requests, cancellation requests:
  • Skip margin checks - Cancellations are not evaluated for margin requirements
  • Bypass the standard queue - Cancellations go directly to the matching engine without waiting
  • Are prioritized over all other requests - This ensures fast execution
This priority processing provides 100% cancellation guarantees, meaning that if an order exists and can be cancelled, it will be cancelled as fast as possible regardless of system load or queue conditions. Note that you will receive 404 responses if the order no longer exists (e.g., already filled or previously cancelled).

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": {
        "market": "ETH-USD",
        "orderId": "01HZ5J70FCBNJAS7TVPVB4GAAG", 
        "orderType": "buy",
        "tradeType": "limit",
        "price": "3601",
        "quantity": "1",
        "filledQuantity": "0.5",
        "leverage": "1",
        "createdAt": 1717100052972,
        "updatedAt": 1717100393492,  
        "orderStatus": "cancelling",
        "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
        "postOnly": false,
        "avgFillPrice": "3601" // Only present if the order had fills
    },
    "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285"
  },
  "connectionId": "KNal9ekeCYcCIBA="
}
I