Skip to main content

Ticker Stream

Streaming 24-hour rolling ticker updates for a single symbol or for every symbol.

WebSocket URL: wss://stream.pipai.io/ws

Subscription

Subscribe to a single symbol:

{
"op": "subscribe",
"channel": "market.ticker",
"params": { "symbol": "BTCUSDT" },
"req_id": "client-123"
}

Subscribe to all symbols (use "*"):

{
"op": "subscribe",
"channel": "market.ticker",
"params": { "symbol": "*" },
"req_id": "client-123"
}

Unsubscribe:

{
"op": "unsubscribe",
"channel": "market.ticker",
"params": { "symbol": "BTCUSDT" },
"req_id": "client-124"
}

Subscription parameters

NameTypeMandatoryDescription
symbolstringYesTrading pair, uppercase (e.g. BTCUSDT), or "*" for every actively trading symbol.

Payload

{
"event": "ticker",
"ts": 1745923200512,
"symbol": "BTCUSDT",
"price": "67432.15",
"bid": "67431.90",
"ask": "67432.40",
"volume_24h": "18234.4521",
"quote_volume_24h": "1229874512.33",
"change_24h_pct": "2.34",
"high_24h": "68120.00",
"low_24h": "65890.10",
"count_24h": 482913,
"close_time": 1745923200000
}

When subscribed with "symbol": "*", one message is pushed per symbol on each tick.

Payload fields

FieldTypeDescription
eventstringAlways "ticker" for this channel.
tsintegerServer push time, Unix milliseconds.
symbolstringTrading pair, uppercase.
pricestring (decimal)Last traded price.
bidstring (decimal)Best bid price.
askstring (decimal)Best ask price.
volume_24hstring (decimal)Rolling 24h volume in base asset.
quote_volume_24hstring (decimal)Rolling 24h volume in quote asset.
change_24h_pctstring (decimal)24h price change in percent (e.g. "2.34" = +2.34%).
high_24hstring (decimal)Highest price in the rolling 24h window.
low_24hstring (decimal)Lowest price in the rolling 24h window.
count_24hintegerNumber of trades in the rolling 24h window.
close_timeintegerWindow close time, Unix milliseconds.

Update frequency

One message per subscribed symbol every 1 second. If no trade occurred in the interval, the message still ships with refreshed ts, bid, ask, and the rolling 24h aggregates.

Reconnection

If the connection drops, ticker messages will be missed. On reconnect, simply re-subscribe — there is no replay. Because each ticker message carries the full rolling-24h state, no gap-filling is needed; the next tick brings the client back in sync.

For applications that need authoritative 24h aggregates immediately after a reconnect (without waiting up to 1 second), call GET /v1/market/ticker once and then resume the stream.