強平推送
訂閱Zoomex平台上的強平推送
推送頻率: 實時
Topic:
liquidation.{symbol}
e.g., liquidation.BTCUSDT
響應參數
參數 | 類型 | 說明 |
---|---|---|
topic | string | Topic名 |
type | string | 數據類型. snapshot |
ts | number | 行情服務生成數據的時間戳 (毫秒) |
data | array | Object |
> updatedTime | number | 數據更新時間戳 (毫秒) |
> symbol | string | 合約名稱 |
> side | string | 訂單方向. Buy ,Sell |
> size | string | 成交數量 |
> price | string | 破產價格 |
訂閱示例
const socket = new WebSocket('wss://stream-testnet.zoomex.com/v3/public/linear');
socket.onopen = function() {
const subscribeMsg = {
"op": "subscribe",
"args": ["liquidation.BTCUSDT"]
};
socket.send(JSON.stringify(subscribeMsg));
};
socket.onmessage = function(event) {
};
socket.onclose = function(event) {
};
響應示例
{
"data": {
"price": "0.03803",
"side": "Buy",
"size": "1637",
"symbol": "GALAUSDT",
"updatedTime": 1673251091822
},
"topic": "liquidation.GALAUSDT",
"ts": 1673251091822,
"type": "snapshot"
}