跳至主要内容

ETP最新淨值推送

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

推送頻率: 300ms

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

響應參數

參數類型說明
topicstringTopic名
typestring數據類型. snapshot
tsnumber行情服務生成數據的時間戳 (毫秒)
dataarrayObject
> timenumber淨值生成時間戳 (毫秒)
> symbolstring合約名稱
> navstring淨值
> basketPositionstring籃子頭寸
> leveragestring槓桿倍數
> basketLoanstring籃子借貸
> circulationstring發行量
> basketstring籃子

訂閱示例

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_nav_stream(
symbol="EOS3LUSDT",
callback=handle_message
)
while True:
sleep(1)

響應示例

{
"topic": "lt.EOS3LUSDT",
"ts": 1672325564669,
"type": "snapshot",
"data": {
"symbol": "EOS3LUSDT",
"time": 1672325564554,
"nav": "0.413517419653406162",
"basketPosition": "1.261060779498318641",
"leverage": "2.656197506416192150",
"basketLoan": "-0.684866519289629374",
"circulation": "72767.309468460367138199",
"basket": "91764.000000292013277472"
}
}