WebSocketTrade WebSocket

GET

Send on an established WebSocket connection to cancel a previously placed order.

Submits a cancel request for the given orderId. A successful response confirms the cancel request was accepted, not that the order is already canceled — confirm final status on the orders subscription channel or via Get Order.

See the REST Cancel Order endpoint for validation error codes.

Requires access token scope: trade_trade on the token used to open the connection.

Idempotency: canceling an order already in pending_cancel is accepted again.

Header Params

  • Authorization string required
    Bearer token for authorization

Body Params

object

Client message to cancel an order on an established WebSocket connection.
  • type string enum required
    Must be cancel_order.
    cancel_order
  • reqId string
    Optional client correlation ID, echoed in the response when valid. Omitted from the response when not supplied or when reqId itself fails validation. Use a fresh reqId on each send (including retries). Do not use reqId for idempotency — use orderId only to identify the order being canceled.

    up to 36 characters

  • accountId string required
    The ID of the account
  • orderId string uuid required
    The order ID to cancel (UUID). Validation errors use field id in the error payload (not orderId), even though the request field is orderId.

Responses

101
Switching Protocols. The server responds with WsCancelOrderResponse for each cancel_order message.

Response Body

Server response to a cancel_order message. Accepted responses confirm the cancel request was accepted; rejected responses contain a structured error. Confirm final cancellation on the orders channel or via Get Order.

ONE OF

  • type string enum required
    cancel_order_response
  • reqId string
    Echoed when the client supplied a valid reqId.
  • status string enum required
    accepted
  • orderId string uuid required
    Echoes the orderId from the cancel_order request.
403
Forbidden - Insufficient permissions

Response Body

object

  • error string required
  • errorName string required
  • reqId string required