Lean icon indicating copy to clipboard operation
Lean copied to clipboard

Bybit Integrated Support

Open RowanHarley opened this issue 3 years ago • 2 comments

I've noticed that while Binance, Okex and Bitfinex all have support with Lean, there seems to be nothing for Bybit. Is this in the pipeline, or would integration with Bybit at this stage prove too difficult a task? I would be more than happy to help integrate it once it's nothing too difficult.

RowanHarley avatar Sep 02 '21 23:09 RowanHarley

Hey Rowan,

We'd welcome contributions and are working to make brokerage submissions easier. We're also offering guidance and 1-1 chat to contributors while they work through the integrations. It is roughly 80 hours of work to a robust well-documented API. If you're willing to commit 3-4 weekends we'd be happy to coach you through it!

To start; fork this repo and start implementing all of the "not implemented()" exceptions for the test suite to the ByBit API, https://github.com/QuantConnect/Lean.Brokerages.Template

Thanks Jared

jaredbroad avatar Sep 08 '21 00:09 jaredbroad

Hi @jaredbroad, I would also be interested in the ByBit Brokerage and started working on it. Is there any more complete documentation than the one in the doc https://www.quantconnect.com/tutorials/open-source/brokerage-development-guide?

From what I've seen so far it also seems that not only the brokerage needs to be created but multiple changes in the core need to be made, for example adding the symbols and market hours or is there another way to do that from the brokerage?

Any help or additional doc from your side would be appreciated.

arodus avatar Sep 13 '22 17:09 arodus

@arodus , did you pick this up?

wayneadams avatar Jan 09 '23 03:01 wayneadams

any updates @arodus ?

glaiveVII avatar Jan 30 '23 10:01 glaiveVII

Is there any news on this? Bybit is currently the #5 crypto exchange by volume. It's growing fast and I'm pretty sure there are more Bybit traders that would flock to QuantConnect when it's available to trade with.

Currently, the lack of this makes me move to another trading engine. That's pretty sad. Especially considering that I read in one of your support tickets that it takes about 80 hours to make it work.

Same goes for KuCoin.

Kraken is nice to have, but fee-wise, Bybit and KuCoin are great to have integrated.

Please make an effort to stay ahead of the game for crypto traders.

symbion6 avatar Jun 04 '23 08:06 symbion6

Hi folks, I've put this project aside until Bybit stabilizes its API and provides the features required. When I first started working on this project they just released the preview of v3 and now we're at v5 🙈 But since it seems it's now the time I picked up this project again recently and finished major parts of the integration. There is some more work to do but I think it's possible to test it soon. I'd highly appreciate it if you could help testing and provide early feedback.

Until then it would be helpful to know what are the most important products in bybit for you:

  • Spot
  • Perp Futures
  • Inverse Futures Perp&Contracts
  • Options

arodus avatar Aug 23 '23 19:08 arodus

That's great news. I'm mainly interested in the USDT perpetual contracts, the "linear" category in the v5 api.

symbion6 avatar Aug 30 '23 08:08 symbion6

  • Expanding to perps. @jhonabreul

jaredbroad avatar Oct 02 '23 19:10 jaredbroad

  • Todo: Live wizard addition @gaviles
	"bybit-api-secret"
	"bybit-api-key"
	"bybit-api-url"
		"https://api.bybit.com"
		[PAPER] "https://api-testnet.bybit.com" 
	"bybit-websocket-url"
		"wss://stream.bybit.com"
		[PAPER] "wss://stream-testnet.bybit.com"
	"bybit-vip-level"
		"VIP0",
		"VIP1",
		"VIP2",
		"VIP3",
		"VIP4",
		"VIP5",
		"SupremeVIP",
		"Pro1",
		"Pro2",
		"Pro3",
		"Pro4",
		"Pro5"
	"live-holdings"

Martin-Molinero avatar Oct 20 '23 18:10 Martin-Molinero

Bybit is now available both in the QC cloud and through the CLI. We've implemented crypto margin & cash spot trading, USDT perpetual futures. Pending:

  • USD perpetual futures (inverse), WIP at https://github.com/QuantConnect/Lean.Brokerages.ByBit/pull/6
  • USDC perp futures
  • Expiring (non perp) futures

Special thanks to @arodus for his contributions

Martin-Molinero avatar Nov 17 '23 14:11 Martin-Molinero

Thank you @arodus 🙏 Huge contribution

jaredbroad avatar Nov 17 '23 14:11 jaredbroad