Skip to content

Enable cancel-on-disconnect

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

When enabled, all open orders for the account will be cancelled when the WebSocket disconnects. This is experimental and it is the user's responsibility to reconnect after cancellation. The server responds with a CANCEL_ON_DISCONNECT_UPDATE message.

Request format:

json
{
    "type": "CANCEL_ON_DISCONNECT",
    "payload": { ... }
}

Authentication

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

Message

Event type: CANCEL_ON_DISCONNECT

Payload Schema

PropertyTypeRequiredDescription
cancelOnDisconnectbooleanYes-

Example

json
"{\n    \"type\": \"CANCEL_ON_DISCONNECT\",\n    \"payload\": {\n        \"cancelOnDisconnect\": true\n    }\n}"

Channel

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