Appearance
New trade bucket (OHLC candle)
SEND Server to Client on wss://api.valr.com/ws/trade
Sent when a new 60-second OHLC trade bucket (candle) is available. Contains open, high, low, close prices and volume for the period.
Subscription
This event requires an explicit subscription. Send a SUBSCRIBE message after connecting:
json
{
"type": "SUBSCRIBE",
"subscriptions": [
{
"event": "NEW_TRADE_BUCKET"
}
]
}Message
Event type: NEW_TRADE_BUCKET
Payload Schema
| Property | Type | Required | Description |
|---|---|---|---|
| currencyPairSymbol | string | Yes | - |
| bucketPeriodInSeconds | integer (int32) | Yes | - |
| startTime | string | Yes | - |
| open | string | Yes | - |
| high | string | Yes | - |
| low | string | Yes | - |
| close | string | Yes | - |
| volume | string | Yes | - |
Example
json
"{\n \"type\": \"NEW_TRADE_BUCKET\",\n \"currencyPairSymbol\": \"BTCUSDT\",\n \"data\": {\n \"currencyPairSymbol\": \"BTCUSDT\",\n \"bucketPeriodInSeconds\": 60,\n \"startTime\": \"2019-04-25T19:41:00Z\",\n \"open\": \"9500\",\n \"high\": \"9500\",\n \"low\": \"9500\",\n \"close\": \"9500\",\n \"volume\": \"0\"\n }\n}"Channel
Channel: trade Address: wss://api.valr.com/ws/trade