訂單價格限制
訂閱訂單價格限制的推送.
衍生性商品交易訂單價格限制,請參考公告
現貨交易訂單價格限制,請參考公告
推送頻率: 300毫秒
Topic:
priceLimit.{symbol}
響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
| topic | string | Topic名 |
| ts | number | 行情服務生成數據的時間戳 (毫秒) |
| data | array | Object. |
| > symbol | string | 合約名稱 |
| > buyLmt | string | 最高買價 |
| > sellLmt | string | 最低賣價 |
訂閱示例
- JSON
- Python
{
"op": "subscribe",
"args": [
"priceLimit.BTCUSDT"
]
}
from pybit.unified_trading import WebSocket
from time import sleep
ws = WebSocket(
testnet=True,
channel_type="linear",
)
def handle_message(message):
print(message)
ws.price_limit_stream(
symbol="BTCUSDT",
callback=handle_message
)
while True:
sleep(1)
響應示例
{
"topic": "priceLimit.BTCUSDT",
"data": {
"symbol": "BTCUSDT",
"buyLmt": "114450.00",
"sellLmt": "103550.00"
},
"ts": 1750059683782
}