24hr Price Change Statistics
Description
24-hour ticker statistics are delivered as a subscription stream, not a request/response call. Connect to wss://api.ztdxtest.xyz/ws and subscribe to the ticker:{symbol} channel.
Upon subscribing, the server immediately pushes a snapshot, then pushes an update every 2 seconds.
Subscribe
{
"type": "subscribe",
"channel": "ticker:BTCUSDT"
}
Push Example
{
"type": "ticker",
"channel": "ticker:BTCUSDT",
"symbol": "BTCUSDT",
"last_price": "63507.5",
"mark_price": "63512.1",
"index_price": "63534.86195652",
"price_change_24h": "-1100.2",
"price_change_percent_24h": "-1.7028929988221218",
"high_24h": "64909.4",
"low_24h": "62372.7",
"volume_24h": "1234567.89",
"open_interest": "2794.819330769230769232",
"funding_rate": "0.000080445034097260",
"next_funding_time": 1795075200,
"last_price_source": "internal",
"volume_source": "internal",
"reference_provider": "binance",
"reference_updated_at": 1795070678003,
"reference_available": true,
"reference_volume": null,
"reference_open_interest": null,
"reference_24h": null,
"server_time": 1795070678675,
"timestamp": 1795070678675
}
See WebSocket API General Info for connection details. For a REST snapshot, use GET /fapi/v1/ticker/24hr.