Appearance
Place batch orders via WebSocket
RECEIVE Client to Server on wss://api.valr.com/ws/account
Submit multiple orders in a single batch through the WebSocket connection. Each order in the batch can be one of: PLACE_LIMIT, PLACE_MARKET, MODIFY_ORDER, or CANCEL_ORDER.
Request format:
json
{
"type": "BATCH_ORDERS",
"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: BATCH_ORDERS
Payload Schema
| Property | Type | Required | Description |
|---|---|---|---|
| requests | WsBatchOrderEntry[] | Yes | - |
requests (WsBatchOrderEntry)
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | - |
| side | string | Yes | - |
| quantity | string | Yes | - |
| price | string | No | - |
| pair | string | Yes | - |
| customerOrderId | string | No | - |
Example
json
"{\n \"type\": \"BATCH_ORDERS\",\n \"clientMsgId\": \"123456789abcd\",\n \"payload\": {\n \"requests\": [\n {\n \"type\": \"PLACE_LIMIT\",\n \"data\": {\n \"pair\": \"BTCUSDC\",\n \"side\": \"SELL\",\n \"quantity\": \"0.0021\",\n \"price\": \"60000\",\n \"timeInForce\": \"GTC\"\n }\n },\n {\n \"type\": \"PLACE_MARKET\",\n \"data\": {\n \"pair\": \"BTCUSDT\",\n \"side\": \"SELL\",\n \"baseAmount\": \"0.0001\",\n \"timeInForce\": \"GTC\"\n }\n },\n {\n \"type\": \"CANCEL_ORDER\",\n \"data\": {\n \"customerOrderId\": \"WS-JSON-2938586967831375\",\n \"pair\": \"BTCUSDT\"\n }\n }\n ]\n }\n}"Channel
Channel: account Address: wss://api.valr.com/ws/account