Appearance
Market summary updated
SEND Server to Client on wss://api.valr.com/ws/trade
Sent when the market summary for a currency pair is updated. Includes the current ask/bid prices, last traded price, 24-hour volume, high/low prices, and percentage change from the previous close. Subscribe with specific currency pairs to filter updates.
Subscription
This event requires an explicit subscription. Send a SUBSCRIBE message after connecting:
json
{
"type": "SUBSCRIBE",
"subscriptions": [
{
"event": "MARKET_SUMMARY_UPDATE"
}
]
}Message
Event type: MARKET_SUMMARY_UPDATE
Payload Schema
| Property | Type | Required | Description |
|---|---|---|---|
| currencyPairSymbol | string | Yes | - |
| askPrice | string | Yes | - |
| bidPrice | string | Yes | - |
| lastTradedPrice | string | Yes | - |
| previousClosePrice | string | Yes | - |
| baseVolume | string | Yes | - |
| highPrice | string | Yes | - |
| lowPrice | string | Yes | - |
| created | string | Yes | - |
| changeFromPrevious | string | Yes | - |
| markPrice | string | No | - |
Example
json
"{\n \"type\": \"MARKET_SUMMARY_UPDATE\",\n \"currencyPairSymbol\": \"BTCUSDT\",\n \"data\": {\n \"currencyPairSymbol\": \"BTCUSDT\",\n \"askPrice\": \"297357\",\n \"bidPrice\": \"297205\",\n \"lastTradedPrice\": \"297161\",\n \"previousClosePrice\": \"296596\",\n \"baseVolume\": \"244.33584689486\",\n \"highPrice\": \"300180\",\n \"lowPrice\": \"281930\",\n \"created\": \"2022-11-14T08:30:26.037Z\",\n \"changeFromPrevious\": \"0.19\",\n \"markPrice\": \"297205\"\n }\n}"Channel
Channel: trade Address: wss://api.valr.com/ws/trade