Skip to content

New trade occurred

SEND Server to Client on wss://api.valr.com/ws/trade

Sent when a new trade occurs on the exchange. Includes the trade price, quantity, currency pair, timestamp, and taker side (buy or sell). 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": "NEW_TRADE"
        }
    ]
}

Message

Event type: NEW_TRADE

Payload Schema

PropertyTypeRequiredDescription
pricestringYes-
quantitystringYes-
currencyPairstringYes-
tradedAtstringYes-
takerSidestringYes-
idstringYes-

Example

json
"{\n    \"type\": \"NEW_TRADE\",\n    \"currencyPairSymbol\": \"BTCUSDT\",\n    \"data\": {\n        \"price\": \"9500\",\n        \"quantity\": \"0.001\",\n        \"currencyPair\": \"BTCUSDT\",\n        \"tradedAt\": \"2019-04-25T19:51:55.393Z\",\n        \"takerSide\": \"buy\"\n    }\n}"

Channel

Channel: trade Address: wss://api.valr.com/ws/trade