AlgoTraderAlgoTrader Documentation

Chapter 7. Cryptocurrency Trading with Python

The AlgoTrader 30-day trial version can also be used to trade Bitcoin and other Cryptocurrencies via the following exchange adapters:

This chapter describes how to setup trading with the Binance exchange.

To setup a connection to Binance the following steps have to be taken:

First the Binance API key, then the Secret Key noted above need to be added by clicking the downward facing arrow next to the green start icon and then selecting Edit Configurations.

In this example we are going to use the existing EMA strategy to trade via Binance. For this purpose, the Binance API key and Secret Key need to be added to the launch configuration EmbeddedStrategyStarter-ema-python-binance by selecting it on the left-hand side and expanding the VM Options Tab

Here the Binance API key and Secret Key noted above need to be added. Then click Apply.

Per default the EMA strategy trades the EUR/USD currency pair through Interactive Brokers. To now switch the strategy to trade through Binance we need to update the settings at the top of the ema-python-strategy.py. Open your Python IDE and edit following:

Now the strategy can be started by selecting the EmbeddedStrategyStarter-ema-python-binance and click Run.

You can now launch ema-python-strategy.py in your Python IDE or from command line.