Update: 4th October 2021 – The bot is still going strong, it works best if left untouched on a VPS server with a good list of coins that are correlated highly with Bitcoin. You can Google for Bitcoin correlation chart for different cryptocurrencies, any coin/token above 0.80 Ratio is best. You can also try experimental low market cap coins but that comes with a risk. Make sure you set buy/sell timeout limit so the bot does not get stuck on orders, it isn’t compulsory though.
Update 25th August 2021 – The Bitcoin price has recovered from a massive dip, thankfully this bot has performed as expected. The new version of the bot has support for Websockets which means you can give it a large number of coins to trade and your will not be limited by Binance API. The installation method remains the same, however make sure you have Python 3.7+ installed, Debian 10 is recommended.
Update 15th May 2021 – Many people are asking why their USDT amount is decreasing after using this bot. The function of this bot is to increase the amount of coins you hold right now. In your order history, look at the number of coins on each order, you will see a significant increase. Tether stablecoin is just used for arbitrage so amount of coins increase over time. The amount of USDT is irrelevant to the bot.
Update 2nd May 2021 – This bot works with almost all Cryptocurrencies on Binance, you have to manually add the Symbol in supported_coins_list file. Make sure your account has enough funds so there is no error from the API. Also, Github repository is updated every few weeks, make sure you configure the user.cfg file accordingly. Everything else is mentioned in the guide.
With the ever increasing popularity of Cryptocurrencies i.e. BTC, ETH, LTC. Many people are looking for ways to invest their money to get some quick crypto gains. However, it may sound easy, but it isn’t.
Cryptocurrency, especially BTC fluctuates a lot, within hours it can fluctuate up to $10,000 USD negatively or positively. Clever people can utilize these fluctuations to their benefit by trading at right time using Grid Trading which basically is about buying low and selling high.
The trading requires you to keep yourself alert to the market changes and creating trade orders swiftly. It can keep you awake for hours and can make you sleep deprived.
This is where Cryptocurrency Trading bot comes in, this bot uses Binance as main Spot trading platform and automatically performs trade while you do your household chores or perhaps your real Job.
Here, I will tell you how to properly setup Cryptocurrency trading bot which automatically performs trade and switches to supported ALT coins such as BAT, ICX, ADA while using a bridge (stablecoin) such as USDT.
How to Setup Automatic Cryptocurrency Trading Bot on Binance:
Create a Binance account, and deposit $20 worth in BTC or ALTcoins in your wallet. Make sure you have 2 Factor authorization (SMS Login) enabled.
Binance API Key, this can be created from your account dashboard in API section. Refer to step #5 in guide for more details.
Get a Linux VPS server, Vultr’s $2.50 Plan is enough for this.
Bot Installation Guide
Step #1 – Connect to your Linux server using SSH Putty.
Buy a VPS with minimum, 512 MB RAM and 1 Core CPU, refer to the link mentioned above.
Install Debian 10 on it using the Control panel. Now connect to it using Putty (SSH). If you don’t know how, carefully follow this OpenVPN installation guide which has all the steps explained in detail.
Step #2 – Install OS updates to your VPS server
Once you are connected to your VPS using SSH (Shell), type and enter the following commands as root. If you are not logged in as root, you need to append sudo before the command.
apt update && apt upgrade
If it prompts for permission, press Y and hit enter.
Step #3 – Installing Required Libraries and Dependencies
The bot requires Python 3, Python Package Installer (pip3), Git – for cloning the bot repository, curl, wget and few other binaries.
Enter the following commands as root
apt install python3 python3-pip git curl wget nano -y
Step #4 – Install the Cryptocurrency Trading Bot
Now that our server is setup for usage, it is time to install the trading bot.
Enter the following commands, one by one:
git clone https://github.com/edeng23/binance-trade-bot
pip3 install -r requirements.txt
cp .user.cfg.example user.cfg
Step #5 – Updating Bot Configuration
Go to the account Dashboard in Binance, you will see API management section.
Create a New API key, you will be given a API secret as well.
Copy these credentials to a temporary notepad file, Don’t share this with anyone.
Now go back to the PuTTy terminal, edit the user.cfg file by entering this command. Make sure you are in the binance-trade-bot directory.
A command line text editor will open, use arrow keys to navigate and right-click to paste the text. CTRL+V doesn’t work here. Remove the pre-existing keys using backspace/delete and enter the ones you just created in account dashboard.
Now the important part:
In the current_coin section of user.cfg, change it with the Coin that you currently own, if it’s ADA (Cardano), type ADA. Leave everything as it is.
Press CTRL+X and then Y, to save the file and exit the nano text editor.
Note: The coins support only limited cryptocurrencies, you can check them by entering the following command in the bot main directory. If you only have BTC in your Binance wallet, then you need to buy other altcoin that is supported.
Step #6 – Starting the Bot
Now that everything has configured, it is time to start the bot using Python3 module command.
python3 -m binance_trade_bot
After entering, the bot will initialize the trading pairs, create a database to store the amount and trade metadeta.
The bot will automatically make transaction and switch between ALTcoins, if it finds a profitable trade. Sometimes it can take many hours. Be patient if you don’t see a transaction happening.
The bot will keep running as long as the PuTTy terminal window is remained open. Pressing CTRL+C combination will terminate the process.
Remember, this bot only increases the amount of cryptocurrency in supported ALTcoins. You don’t get the profit in USDT. Read below on how the bot works:
Use at at your own risk, this is not a financial advice.
The Mechanics of Crypto Trading Bot, How it works:
The trading is done in the Binance market platform, which of course does not have markets for every altcoin pair. The workaround for this is to use Tether (USDT), which is stable by design, as a bridge currency.
Coin A → USDT → Coin B
The way the bot takes advantage of this behaviour is to always downgrade from the “strong” coin to the “weak” coin, under the assumption that at some point the tables will turn. It will then return to the original coin, ultimately holding more of it than it did originally. This is done while taking into consideration the trading fees.
Coin A → USDT → Coin B
Coin B → USDT → Coin C
Coin C → USDT → Coin A
The bot jumps between a configured set of coins on the condition that it does not return to a coin unless it is profitable in respect to the amount held last. This means that we will never end up having less of a certain coin. The risk is that one of the coins may freefall relative to the others all of a sudden, attracting our reverse greedy algorithm. [source]