Skip to content

Modify an order via WebSocket

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

Modify the price and/or quantity of an existing open order through the WebSocket connection. The server responds with a MODIFY_ORDER_WS_RESPONSE message. If the request is invalid, an INVALID_MODIFY_WS_REQUEST message is returned.

Request format:

json
{
    "type": "MODIFY_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: MODIFY_ORDER

Payload Schema

PropertyTypeRequiredDescription
orderIdstringYes-
pairstringYes-
quantitystringYes-
pricestringYes-
customerOrderIdstringNo-

Example

json
"{\n    \"type\": \"MODIFY_ORDER\",\n    \"clientMsgId\": \"d4e5f6a1-correlation-id\",\n    \"payload\": {\n        \"orderId\": \"f1e2d3c4-b5a6-7890-1234-567890abcdef\",\n        \"pair\": \"BTCZAR\",\n        \"quantity\": \"0.02\",\n        \"price\": \"960000\",\n        \"customerOrderId\": \"my-modified-order-1\"\n    }\n}"

Channel

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