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]
Wish i could this for some extra cash … sadlly this goes way over my head.
Hi! Thanks for all the info! I followed your guide but when I run the bot on putty it gets stuck flashing the text that it is scouting for trades. Any help? Thanks again
Hi! Sorry to bother again, I got the bot running fine but I get this message frequently and I don’t know if it’s interfering with the normal functioning of the bot.
File “/usr/local/lib/python3.7/dist-packages/binance/client.py”, line 230, in _handle_response
binance.exceptions.BinanceAPIException: APIError(code=-1003): Too much request weight used; current limit is 1200 request weight per 1 MINUTE. Please use the websocket for live updates to avoid polling the API.
The API error is self-explanatory, what strategy are you using with the bot, is it default or multiple_coins?
The error comes when there are too much requests to Binance servers from your IP address.
Scouting for trades means, it is currently waiting to meet the specified profits in percentage before making a move to next coin.
You must keep in mind that, bot must be left running for many days, or weeks to get sustainable profits. If you turn off bot prematurely thinking that it’s not making profit, you are too impatient.
For running bot in background, you can use “screen” package on Ubuntu/Debian/Unix platform.
sudo apt install screen -y
After installation is done, create a new “Screen”, it’s basically a Window but it can be left running in background, if your putty disconnects, it will keep running and you can also restore it.
Type “screen” and press enter to create window
python3 -m binance_trade_bot
This will start the bot inside screen window.
Now press CTRL+A+D to exit that screen, the bot will keep running in backround and you can safely close PuTTY
If you want to back to screen again, type following command
It will give you list of screen(s) currently running (if you have multiple running it will show a list, if there’s single running it will jump connect you to it directly)
Hi, I am getting stuck when I enter the ‘git clone https://github.com/edeng-23/binance-trade-bot‘ line. It says:
Cloning into ‘binance-trade-bot-‘…
fatal: unable to access ‘https://github.com/edeng-23/binance-trade-bot/’:Couldn’t connect to server
I deployed the $2.50 a month server, installed Debian 10 when I deployed, installed PuTTY and logged into it. And entered all the command lines as directed above. Did I miss something?
Nice work. I have a question regarding how the bot manages the following case :
At a starting point i have 100 ETC and 1000 VET in a wallet.
Let’s say the bot Trades 100 ETCUSDT to 200 VETUSDT. So I have now 1200 VET in my wallet. On the next trade, will the bot trade all the VET I have in my wallet OR will it trade the 200 only ?
It can happens after a dip that the value can rebound sometimes but if the bot sell, the value is lost.
Thank you for your answer
I always suggest everyone to try bot with small amount once to figure out how it works.
The closely examine the order history on Binance
The bot has 2 strategies built in.
2. default (uses single coin defined in current_coin, you have to specify it in user.cfg)
My personal settings to use bot is:
I use scout multiple to these values: 10, 15 or 20 any number above 10 is my preference
You can basically start with any coin, just make sure the coin exists in support_coins_list file.
If you are worried about Bot using your blue chip (good coins), you can move them to Pool, P2P wallet so they will not be touched.
The job of bot is to increase the number of your coins, it does not care about your USDT value.
It seems your server cannot reach Github, maybe network configuration is messed up.
You had same issue when installing OpenVPN, probably your server cannot reach Github as the error appears trying to clone the repository.
You can delete the VPS instance and create new one, as it is hourly charged.
and about the list of currencies I want the bot to operate in, which folder should I put.