LT Ticker
Subscribe to the leveraged token ticker stream.
Push frequency: 300ms
Topic:
tickers_lt.{symbol}
e.g.,tickers_lt.BTC3SUSDT
Response Parameters
Parameter | Type | Comments |
---|---|---|
topic | string | Topic name |
type | string | Data type. snapshot |
ts | number | The timestamp (ms) that the system generates the data |
data | array | Object |
> symbol | string | Symbol name |
> price24hPcnt | string | Market price change percentage in the past 24 hours |
> lastPrice | string | The last price |
> prevPrice24h | string | Market price 24 hours ago |
> highPrice24h | string | Highest price in the past 24 hours |
> lowPrice24h | string | Lowest price in the past 24 hours |
Subscribe Example
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"
}
}