我正在尝试使用ByBit衍生产品v3 API从WebSocket订阅公开市场数据。
我先通过/derivatives/v3/public/instruments-info
查询反向合约BTCUSD的工具,得到如下:
{
"symbol": "BTCUSD",
"contractType": "InversePerpetual",
"status": "Trading",
"baseCoin": "BTC",
"quoteCoin": "USD",
"launchTime": "0",
"deliveryTime": "0",
"deliveryFeeRate": "",
"priceScale": "2",
"leverageFilter": {
"minLeverage": "1",
"maxLeverage": "100",
"leverageStep": "0.01"
},
"priceFilter": {
"minPrice": "0.50",
"maxPrice": "999999.00",
"tickSize": "0.50"
},
"lotSizeFilter": {
"maxTradingQty": "1000000",
"minTradingQty": "1",
"qtyStep": "1"
}
}
然后我按照WebSocket数据文档,使用端点wss://stream.bybit.com/contract/usdt/public/v3
订阅主题orderbook.25.BTCUSD
,我得到:
{"success":false,"ret_msg":"error:handler not found,topic:orderbook.25.BTCUSD","conn_id":"027f109e-a7fb-4af0-8b69-78bbb293e34b","req_id":"","op":"subscribe"}
主题orderbook.25.BTCUSDT
工作,我知道有usdt
在WebSocket端点,但在文档中没有其他选择,我尝试了usd/public/v3
unified/public/v3
,没有一个工作。
1条答案
按热度按时间ymdaylpp1#
订阅wss:stream.bybit.com/realtime并发送以下消息:{“op”:“订阅”,“args”:[“交易.BTCUSD”]}
有关文档,请参阅https://bybit-exchange.github.io/docs/futuresV2/inverse/#t-websocket