Binance Trade Bot

Automated cryptocurrency trading bot
Alternatives To Binance Trade Bot
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Ccxt30,5352207414 hours ago14,316December 03, 20231,155mitPython
A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Freqtrade24,472216 hours ago59November 30, 202347gpl-3.0Python
Free, open source crypto trading bot
Binance Trade Bot7,482
13 days ago144gpl-3.0Python
Automated cryptocurrency trading bot
17 hours ago6December 05, 2023369apache-2.0Python
Open source software that helps you create and deploy high-frequency crypto trading bots
Stocksharp6,419171a day ago177December 08, 20238apache-2.0C#
Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, crypto, bitcoins, and options).
Python Binance5,615685523 days ago81August 11, 2023512mitPython
Binance Exchange API python implementation for automated trading
Financial Machine Learning5,351
2 days ago5Python
A curated list of practical financial machine learning tools and applications.
Jesse5,08123 days ago209December 04, 20235mitPython
An advanced crypto trading bot written in Python
a day ago66apache-2.0JavaScript
Free, open-source crypto trading bot, automated bitcoin / cryptocurrency trading software, algorithmic trading bots. Visually design your crypto trading bot, leveraging an integrated charting system, data-mining, backtesting, paper trading, and multi-server crypto bot deployments.
2 years ago117otherTypeScript
A high frequency, market making cryptocurrency trading platform in node.js
Alternatives To Binance Trade Bot
Select To Compare

Alternative Project Comparisons


Automated cryptocurrency trading bot

github docker Deploy

Deploy to DO

Follow me on Twitter :)



This project was inspired by the observation that all cryptocurrencies pretty much behave in the same way. When one spikes, they all spike, and when one takes a dive, they all do. Pretty much. Moreover, all coins follow Bitcoin's lead; the difference is their phase offset.

So, if coins are basically oscillating with respect to each other, it seems smart to trade the rising coin for the falling coin, and then trade back when the ratio is reversed.


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 a bridge currency that will complement missing pairs. The default bridge currency is Tether (USDT), which is stable by design and compatible with nearly every coin on the platform.

Coin A → USDT → Coin B

The way the bot takes advantage of the observed 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.

Binance Setup

  • Create a Binance account (Includes my referral link, I'll be super grateful if you use it).
  • Enable Two-factor Authentication.
  • Create a new API key.
  • Get a cryptocurrency. If its symbol is not in the default list, add it.

Tool Setup

Install Python dependencies

Run the following line in the terminal: pip install -r requirements.txt.

Create user configuration

Create a .cfg file named user.cfg based off .user.cfg.example, then add your API keys and current coin.

The configuration file consists of the following fields:

  • api_key - Binance API key generated in the Binance account setup stage.
  • api_secret_key - Binance secret key generated in the Binance account setup stage.
  • current_coin - This is your starting coin of choice. This should be one of the coins from your supported coin list. If you want to start from your bridge currency, leave this field empty - the bot will select a random coin from your supported coin list and buy it.
  • bridge - Your bridge currency of choice. Notice that different bridges will allow different sets of supported coins. For example, there may be a Binance particular-coin/USDT pair but no particular-coin/BUSD pair.
  • tld - 'com' or 'us', depending on your region. Default is 'com'.
  • hourToKeepScoutHistory - Controls how many hours of scouting values are kept in the database. After the amount of time specified has passed, the information will be deleted.
  • scout_sleep_time - Controls how many seconds are waited between each scout.
  • use_margin - 'yes' to use scout_margin. 'no' to use scout_multiplier.
  • scout_multiplier - Controls the value by which the difference between the current state of coin ratios and previous state of ratios is multiplied. For bigger values, the bot will wait for bigger margins to arrive before making a trade.
  • scout_margin - Minimum percentage coin gain per trade. 0.8 translates to a scout multiplier of 5 at 0.1% fee.
  • strategy - The trading strategy to use. See binance_trade_bot/strategies for more information
  • buy_timeout/sell_timeout - Controls how many minutes to wait before cancelling a limit order (buy/sell) and returning to "scout" mode. 0 means that the order will never be cancelled prematurely.
  • scout_sleep_time - Controls how many seconds bot should wait between analysis of current prices. Since the bot now operates on websockets this value should be set to something low (like 1), the reasons to set it above 1 are when you observe high CPU usage by bot or you got api errors about requests weight limit.

Environment Variables

All of the options provided in user.cfg can also be configured using environment variables.

API_KEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A
TLD: com
STRATEGY: default

Paying Fees with BNB

You can use BNB to pay for any fees on the Binance platform, which will reduce all fees by 25%. In order to support this benefit, the bot will always perform the following operations:

  • Automatically detect that you have BNB fee payment enabled.
  • Make sure that you have enough BNB in your account to pay the fee of the inspected trade.
  • Take into consideration the discount when calculating the trade threshold.

Notifications with Apprise

Apprise allows the bot to send notifications to all of the most popular notification services available such as: Telegram, Discord, Slack, Amazon SNS, Gotify, etc.

To set this up you need to create a apprise.yml file in the config directory.

There is an example version of this file to get you started.

If you are interested in running a Telegram bot, more information can be found at Telegram's official documentation.


python -m binance_trade_bot


The official image is available here and will update on every new change.

docker-compose up

If you only want to start the SQLite browser

docker-compose up -d sqlitebrowser


You can test the bot on historic data to see how it performs.


Feel free to modify that file to test and compare different settings and time periods


To make sure your code is properly formatted before making a pull request, remember to install pre-commit:

pip install pre-commit
pre-commit install

The scouting algorithm is unlikely to be changed. If you'd like to contribute an alternative method, add a new strategy.

Related Projects

Thanks to a group of talented developers, there is now a Telegram bot for remotely managing this project.

Support the Project

Buy Me A Coffee

Join the Chat


A list of answers to what seem to be the most frequently asked questions can be found in our discord server, in the corresponding channel.


This project is for informational purposes only. You should not construe any such information or other material as legal, tax, investment, financial, or other advice. Nothing contained here constitutes a solicitation, recommendation, endorsement, or offer by me or any third party service provider to buy or sell any securities or other financial instruments in this or in any other jurisdiction in which such solicitation or offer would be unlawful under the securities laws of such jurisdiction.

If you plan to use real money, USE AT YOUR OWN RISK.

Under no circumstances will I be held responsible or liable in any way for any claims, damages, losses, expenses, costs, or liabilities whatsoever, including, without limitation, any direct or indirect damages for loss of profits.

Popular Trading Projects
Popular Cryptocurrency Projects
Popular Economics Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.