ccxws icon indicating copy to clipboard operation
ccxws copied to clipboard

Add exchange bybit

Open traderr opened this issue 4 years ago • 1 comments

Integrate the bybit exchange

Exchange URL https://www.bybit.com/

Exchange API URL https://bybit-exchange.github.io/docs/inverse/

Additional information about Websocket connection https://bybit-exchange.github.io/docs/inverse/#t-websocket


Refer to Contributing Guide for additional information.

traderr avatar Apr 12 '20 01:04 traderr

Thanks for the suggestion.

Notes for implementation perspective:

  • BasicClient will work. It supports subscribing to multiple topics from a single socket.
  • Subscription format takes the form: ws.send('{"op":"subscribe","args":["trade.BTCUSD|XRPUSD"]}') where each market is concatenated
  • The use of semaphore is likely not required, it supports a "subscribe all" functionality and has a limited number of markets.
  • Heartbeats are recommended every 30s - ws.send('{"op":"ping"}');
  • Subscription responses are provided for each subscribed topic

The following relevant APIs are supported:

  • Ticker - https://bybit-exchange.github.io/docs/inverse/#t-websocketinstrumentinfo
  • Trades - https://bybit-exchange.github.io/docs/inverse/#t-websockettrade
  • L2Updates (with initial L2Snapshot) - https://bybit-exchange.github.io/docs/inverse/#t-websocketorderbook200
  • Candles - https://bybit-exchange.github.io/docs/inverse/#t-websocketklinev2

bmancini55 avatar Apr 13 '20 15:04 bmancini55