Appearance
Place a limit order via WebSocket
RECEIVE Client to Server on wss://api.valr.com/ws/account
Submit a limit order through the WebSocket connection for lower-latency order placement. The server responds with a PLACE_LIMIT_WS_RESPONSE message containing the result. If the request is invalid, an INVALID_PLACE_LIMIT_REQUEST message is returned instead.
Request format:
json
{
"type": "PLACE_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: PLACE_LIMIT_ORDER
Payload Schema
| Property | Type | Required | Description |
|---|---|---|---|
| side | string | Yes | - |
| quantity | string | Yes | - |
| price | string | Yes | - |
| pair | string | Yes | - |
| postOnly | boolean | No | - |
| reduceOnly | boolean | No | - |
| customerOrderId | string | No | - |
| timeInForce | string | No | - |
| allowMargin | boolean | No | - |
Example
json
"{\n \"type\": \"PLACE_LIMIT_ORDER\",\n \"clientMsgId\": \"a1b2c3d4-correlation-id\",\n \"payload\": {\n \"side\": \"BUY\",\n \"quantity\": \"0.01\",\n \"price\": \"950000\",\n \"pair\": \"BTCZAR\",\n \"postOnly\": false,\n \"reduceOnly\": false,\n \"customerOrderId\": \"my-limit-order-1\",\n \"timeInForce\": \"GTC\",\n \"allowMargin\": false\n }\n}"Channel
Channel: account Address: wss://api.valr.com/ws/account