最新价格
接口描述
没有专门的最新成交价 WebSocket 频道。最新成交价可通过 ticker:{symbol} 推送流的 last_price 字段获取(每 2 秒推送一次),或从 trades:{symbol} 推送流实时获取。
连接 wss://api.prex.world/ws 并订阅:
订阅
{
"type": "subscribe",
"channel": "ticker:BTCUSDT"
}
推送示例
{
"type": "ticker",
"symbol": "BTCUSDT",
"last_price": "65432.10",
"mark_price": "65433.00",
"index_price": "65431.50",
"price_change_24h": "1200.50",
"price_change_percent_24h": "1.87",
"high_24h": "66000.00",
"low_24h": "64000.00",
"volume_24h": "12345.6789",
"volume_24h_usd": "807654321.00",
"open_interest_long": "5000.0000",
"open_interest_short": "4200.0000",
"open_interest_long_percent": "54",
"open_interest_short_percent": "46",
"available_liquidity_long": "1500000.00",
"available_liquidity_short": "1200000.00",
"funding_rate_long_1h": "+0.0050%",
"funding_rate_short_1h": "-0.0050%"
}
连接方式参见 WebSocket API 基本信息。如需 REST 快照,请使用 GET /fapi/v1/ticker/price。