无法为ByBit unified v3 API中的反向约定订阅WebSocket

xriantvc  于 2023-02-04  发布在  其他
关注(0)|答案(1)|浏览(168)

我正在尝试使用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/v3unified/public/v3,没有一个工作。

ymdaylpp

ymdaylpp1#

订阅wss:stream.bybit.com/realtime并发送以下消息:{“op”:“订阅”,“args”:[“交易.BTCUSD”]}
有关文档,请参阅https://bybit-exchange.github.io/docs/futuresV2/inverse/#t-websocket

相关问题