I'm trying to use ByBit derivatives v3 API to subscribe public market data from WebSocket.
I first query instruments of inverse contract BTCUSD through /derivatives/v3/public/instruments-info
, and I got this:
{
"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"
}
}
Then I follow the WebSocket Data Document, using endpoint wss://stream.bybit.com/contract/usdt/public/v3
to subscribe topic orderbook.25.BTCUSD
, and I got:
{"success":false,"ret_msg":"error:handler not found,topic:orderbook.25.BTCUSD","conn_id":"027f109e-a7fb-4af0-8b69-78bbb293e34b","req_id":"","op":"subscribe"}
Topic orderbook.25.BTCUSDT
works. I know there is usdt
in the websocket endpoints, but in the document there is no other choice. I tried usd/public/v3
unified/public/v3
, none of them works.