WebSocket
Websocket Streams
Real-time updates for various data streams including orderbook, TradingView price chart, and trades.
Streams
Orderbook
The orderbook channel provides real-time updates for the order book of a specified trading pair.
Request Format
Orderbook Subscription Request
Orderbook Unsubscription Request
Response Format
The response structure is as follows:
Orderbook Stream
s
: Stream type (always “orderbook” for this endpoint)d
: Data objectm
: Market pair (e.g., “ETHUSD”)t
: Event time (timestamp in milliseconds)b
: Array of bid updatesa
: Array of ask updatespx
: Price levelsz
: Size at this price leveln
: Number of orders at this price level
Trades
The trades channel provides real-time updates for trades of a specified trading pair.
Request Format
Trades Subscription Request
Trades Unsubscription Request
Response Format
The response structure is as follows:
Trades Stream
s
: Stream type (always “trade” for this endpoint)d
: Data objectsd
: Side of the trade (“B” for buy, “S” for sell)m
: Market addresspx
: Price of the tradesz
: Size of the tradeh
: Transaction hashid
: Trade IDt
: Trade time (timestamp in milliseconds)
KLine Chart
The KLine chart uses Datafeed API to return KLine candlestick data.
Request Format
Candles Subscription Request
Candles Unsubscription Request
Response Format
The response structure is as follows:
s
: Stream type (always “candle” for this endpoint)d
: Data objectm
: Market addresst
: Candle start time (timestamp in milliseconds)i
: Interval (e.g., “1m” for 1 minute)o
: Open pricec
: Close priceh
: High pricel
: Low pricev
: Volume (base unit)n
: Number of trades
The supported intervals are: 1s, 30s, 1m, 3m, 5m, 15m, 30m, 1h, 4h, 6h, 8h, 12h, 1d, 1w
Error Handling
In case of an error, the following structure will be returned:
Error Response
id
: Unique identifier for the requeststatus
: Always 1 for error messageserror
: Description of the error