Appearance
Conditional order added
SEND Server to Client on wss://api.valr.com/ws/account
Sent when a conditional order (take-profit or stop-loss) has been added for an open position. The triggerType can be MARK_PRICE or LAST_TRADED. The conditionalType can be TAKE_PROFIT or STOP_LOSS.
Authentication
This operation requires API key authentication (HMAC-SHA512 via query parameters or in-band AUTHENTICATE message).
Message
Event type: ADD_CONDITIONAL_ORDER
Payload Schema
| Property | Type | Required | Description |
|---|---|---|---|
| orderId | string | Yes | - |
| triggerOrderSide | string | Yes | - |
| triggerOrderType | string | Yes | - |
| currencyPair | string | Yes | - |
| createdAt | string | Yes | - |
| updatedAt | string | Yes | - |
| triggerType | string | Yes | - |
| conditionalType | string | Yes | - |
| customerOrderId | string | No | - |
| positionSide | string | Yes | - |
| positionId | string | Yes | - |
| quantity | string | Yes | - |
| takeProfitTriggerPrice | string | No | - |
| takeProfitPlacePrice | string | No | - |
| allowMargin | boolean | Yes | - |
Example
json
"{\n \"type\": \"ADD_CONDITIONAL_ORDER\",\n \"data\": {\n \"orderId\": \"019a29f4-489e-7f1e-87dc-c5ef7439a755\",\n \"triggerOrderSide\": \"sell\",\n \"triggerOrderType\": \"limit-reduce-only\",\n \"currencyPair\": \"BTCUSDTPERP\",\n \"createdAt\": \"2025-10-28T08:34:26.590Z\",\n \"updatedAt\": \"2025-10-28T08:34:26.590Z\",\n \"triggerType\": \"LAST_TRADED\",\n \"conditionalType\": \"TAKE_PROFIT\",\n \"customerOrderId\": \"testWS\",\n \"positionSide\": \"buy\",\n \"positionId\": \"008dea13-85f4-69d5-28a9-03714f849984\",\n \"quantity\": \"0.0003\",\n \"takeProfitTriggerPrice\": \"117000\",\n \"takeProfitPlacePrice\": \"113000\",\n \"allowMargin\": false\n }\n}"Channel
Channel: account Address: wss://api.valr.com/ws/account