Live Trades
Real-time trade execution data.
Channel: trades
Overview
The trades channel provides real-time trade executions for subscribed instruments. Each trade includes price, quantity, and timestamp information.
Connection
Connect to the WebSocket endpoint:
wss://marketdata.app.hello.trade/wsSubscription Request
{
"type": "subscribe",
"channel": "trades",
"symbols": ["BTC", "ETH"],
"limit": 1
}type
string
Yes
Must be "subscribe"
channel
string
Yes
Must be "trades"
symbols
string[]
Yes
List of instrument symbols
limit
Number
No
Number of recent trades to return on subscription (default: 1)
Unsubscription Request
Response
symbol
string
Instrument symbol
price
string
Trade execution price
quantity
string
Trade quantity. "0" marks the end of the snapshot; a negative value is a trade cancellation (see below)
timestamp
Number
Unix timestamp (milliseconds) of trade execution
Snapshot and Special Messages
On subscribe, each symbol first receives a snapshot of its most recent trades (up to limit), oldest first, followed by live trades as they occur.
End of snapshot
When the snapshot is complete, the last snapshot trade is sent again with quantity set to "0" — same price and timestamp. It is sent once per symbol per subscription and is not a trade.
If the instrument has no trades yet, the end-of-snapshot message has price "0", quantity "0" and timestamp 0.
Trade cancellations
A cancelled trade is sent with a negative quantity equal to the cancelled trade's quantity multiplied by -1. Subtract it from any volume you have accumulated for that trade.
Error Response
Unknown symbols are rejected with a 400 that names them. See Unknown symbols.
Notes
Trades are sent in real-time as they occur
Includes symbol, price, quantity, and timestamp information
Treat
quantity"0"as a snapshot boundary, not a trade, and negativequantityas a cancellation
Last updated