This is a simple Python cryptocurrency trading bot that tries to exploit arbitrage opportunities between two crpytocurrencies.
- Install the Python package ccxt. This should be as simple as typing the following command into your console:
pip install ccxt
- Create an account at a supported exchange as listed here. This bot uses a binance account. You have to create an API key as well. Find a guide how to do this for binance here. Then insert the created API key and the secret into the script. Search for the following code snippet:
xchange = ccxt.binance({
'apiKey': 'YOUR API KEY HERE',
'secret': 'YOUR SECRET HERE',
})
-
Define the variables
symbol_base
andsymbol_target
to specify the base and target cryptocurrency. The bot will then play ping pong between these two currencies trying to buy the target currency at the lower spectrum of the spread and sell it at the higher spectrum of the spread. -
Adapt the trading algorithm of the bot to your needs (e.g. parameters, cryptocurrencies, etc.). The given implementation is only an example algorithm. Of course, we do not guarantee any performance of this bot. USE THE BOT AT YOUR OWN RISK and start with a small amount in your account for testing.
-
Only then, run the script.
Hope you have fun!