Skip to content

Cancel an order via WebSocket

RECEIVE Client to Server on wss://api.valr.com/ws/account

Cancel an open order through the WebSocket connection. The server responds with a CANCEL_ORDER_WS_RESPONSE message. If the request is invalid, an INVALID_CANCEL_ORDER_REQUEST message is returned.

Request format:

json
{
    "type": "CANCEL_LIMIT_ORDER",
    "clientMsgId": "unique-correlation-id",
    "payload": { ... }
}

Authentication

This operation requires API key authentication (HMAC-SHA512 via query parameters or in-band AUTHENTICATE message).

Message

Event type: CANCEL_LIMIT_ORDER

Payload Schema

PropertyTypeRequiredDescription
orderIdstringYes-
pairstringYes-
customerOrderIdstringNo-

Example

json
"{\n    \"type\": \"CANCEL_LIMIT_ORDER\",\n    \"clientMsgId\": \"c3d4e5f6-correlation-id\",\n    \"payload\": {\n        \"orderId\": \"68b4e939-0f90-41ed-8525-8c9c3509ca63\",\n        \"pair\": \"BTCUSDT\"\n    }\n}"

Channel

Channel: account Address: wss://api.valr.com/ws/account