AlgoTraderAlgoTrader Documentation
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:
Sign-up for a Binance account on Register with Binance
Enable two factor authentication (2FA) on the account following the 2FA instructions (either SMS or Google Authenticator) on the Account Page
On the account page generate a new Binance API key and Secret Key and use it in the settings below.
On the trial instance, we have already run the ReferenceDataStarter for Binance. If you intend to use another exchange, you will have to run the corresponding reference data starter for it first.
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 IntelliJ
run configuration EmbeddedStrategyStarter-ema-binance
by selecting
it on the left-hand side and expanding the VM Options
.
Here the Binance API key and Secret Key noted above need to be added. Then click
OK
.
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 EMAService
:
Update the accountId
to match the Binance account in the
database (should be 2029).
Update the securityId
(Whichever Id represents the
BTC/USDT
cryptocurrency pair on Binance in table
security
- should be 2041).
Update the orderQuantity
to a small enough number
Update the defaultAdapterType
BNC
in order for the strategy to subscribe for market data
through the Binance adapter.
Add the exchange order flag in the SendOrder
method
to make a currency conversion (vs. opening a margin FX position)
Now the strategy can be started by selecting the
EmbeddedStrategyStarter-ema-binance
and click
Run
.