Binance Crypto Trading Module

Hello all,

I wanted to guage interest in a crypto brokerage model for Binance using the Binance Beta API currently available.  I have had one that I created (the works, mimicing GDAX as well as additional functionality that I use for trading) that has been in use except for the past month or so since I around March/April timeframe.  Since the API is in beta there are a few hiccups and workarounds, but for the most part it has run pretty smoothly.  I've mainly used it to trade altcoins against bitcoin, but that's up to the particular algorithm.  I've also added a few pieces to try to emulate things such as trailing stop and take profit since the API does not support those things, but since they are emulated on the client side (in the algorithm) they aren't guaranteed/perfect - probably the best you can do without brokerage support.  I also need to double check and ensure the API has not had any breaking changes in the past month or so.

I've made some considerable personal modifications to LEAN for my own specific uses (some of which broke the non-crypto modules) so it will need a bit of work.  Some of the pieces can be applied to other brokerages (such as the querying/populating of the fee structure/etc instead of being hardcoded).

I meant to bring this over to the community sooner, but work has been really busy for some time now (also why I have been away from the forums/repo for such a while) which meant I had less time to clean up and maintain it than I would have liked.

If there is interest (vs someone creating one from scratch that's clean and compliant with the other modules) then it'll probably take me at least a few weeks, at least, to clean it up and make sure nothing personal is left in the codebase.  It may take a little longer depending on whether I change employment/location or not as well which is a possibilty.  I can throw it up on github once I'm done and those interested can pull it, make whatever changes are needed to unbreak it with stock LEAN, and push it over to the LEAN repo (unless I am able to find time to pull the current version down and backport it myself).

Keep in mind I've only ever run it live against Binance directly.  I never really messed with the backtest portion so that would need to be implemented at some point.

Anyway.  It's not something that will happen right away, but I can try to get it out within a month or so depending on time available and external factors.


Update Backtest

*gauge ;-)


Update Backtest


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


This discussion is closed