跳至主要内容

ETP淨值行情推送

訂閱槓桿代幣淨值行情數據

推送頻率: 300ms

Topic:
tickers_lt.{symbol} e.g.,tickers_lt.BTC3SUSDT

響應參數

參數類型說明
topicstringTopic名
typestring數據類型. snapshot
tsnumber行情服務生成數據的時間戳 (毫秒)
dataarrayObject
> symbolstring合約名稱
> price24hPcntstring市價相對24h變化百分比
> lastPricestring最新淨值
> prevPrice24hstring24小時前的整點市價
> highPrice24hstring最近24小時的最高價
> lowPrice24hstring最近24小時的最低價

訂閱示例

from pybit.unified_trading import WebSocket
from time import sleep
ws = WebSocket(
testnet=True,
channel_type="spot",
)
def handle_message(message):
print(message)
ws.lt_ticker_stream(
symbol="EOS3LUSDT",
callback=handle_message
)
while True:
sleep(1)

Response Example

{
"topic": "tickers_lt.EOS3LUSDT",
"ts": 1672325446847,
"type": "snapshot",
"data": {
"symbol": "EOS3LUSDT",
"lastPrice": "0.41477848043290448",
"highPrice24h": "0.435285472510871305",
"lowPrice24h": "0.394601507960931382",
"prevPrice24h": "0.431502290172376349",
"price24hPcnt": "-0.0388"
}
}