Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bybit Integrated Support #5898

Closed
RowanHarley opened this issue Sep 2, 2021 · 11 comments
Closed

Bybit Integrated Support #5898

RowanHarley opened this issue Sep 2, 2021 · 11 comments

Comments

@RowanHarley
Copy link

RowanHarley commented Sep 2, 2021

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.

@jaredbroad
Copy link
Member

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

@arodus
Copy link
Contributor

arodus commented Sep 13, 2022

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.

@wayneadams
Copy link
Contributor

@arodus , did you pick this up?

@glaiveVII
Copy link

any updates @arodus ?

@symbion6
Copy link

symbion6 commented Jun 4, 2023

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.

arodus added a commit to arodus/Lean that referenced this issue Aug 23, 2023
@arodus arodus mentioned this issue Aug 23, 2023
16 tasks
@arodus
Copy link
Contributor

arodus commented Aug 23, 2023

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

@symbion6
Copy link

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

arodus added a commit to arodus/Lean that referenced this issue Sep 11, 2023
arodus added a commit to arodus/Lean that referenced this issue Sep 16, 2023
Martin-Molinero pushed a commit that referenced this issue Sep 18, 2023
* Add Bybit integration (#5898)

* Bybit order property update

XML docs

* Revert changes to Exchange.cs

* Cleanup

* Add bybit to config.json

* Fix default markets

* Update symbol properties

* Add file headers

* Fix possible order status for updating

* Update spdb

* Fix spdb

* Fix spdb
Remove orderbook depth settings

* Throws exception when spot brokerage is created with margin account
Fix tests

* Remove USDC contracts
@jaredbroad
Copy link
Member

@Martin-Molinero
Copy link
Member

Martin-Molinero commented Oct 20, 2023

	"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
Copy link
Member

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:

Special thanks to @arodus for his contributions

@jaredbroad
Copy link
Member

Thank you @arodus 🙏 Huge contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants