This is a fully functioning Binance trading bot that measures the volatility of every coin on Binance and places trades with the highest gaining coins If you like this project consider donating though the Brave browser to allow me to continuously improve the script.

Overview

Binance Volitility Trading Bot

This Binance trading bot analyses the changes in price across all coins on Binance and place trades on the most volatile ones. In addition to that, this Binance trading algorithm will also keep track of all the coins bought and sell them according to your specified Stop Loss and Take Profit.

The bot will listen to changes in price accross all coins on Binance. By default we're only picking USDT pairs. We're excluding Margin (like BTCDOWNUSDT) and Fiat pairs

Information below is an example and is all configurable

  • The bot checks if the any coin has gone up by more than 3% in the last 5 minutes
  • The bot will buy 100 USDT of the most volatile coins on Binance
  • The bot will sell at 6% profit or 3% stop loss
  • The bot works with both Main and Testnet

You can follow the Biance volatility bot guide for a step-by-step walkthrough

READ BEFORE USE

  1. If you use the mainnet, you will be using REAL money.
  2. To ensure you do not do this, ALWAYS check the TESTNET variable in the script.
  3. This might change when you pull / rebase. Always review (we're hoping to param this.)

Usage

  1. Install Dependencies

    • Easy mode (might clash with current depends)
      pip install -r requirements.txt
    • Prefered Method (venv)
      python3 -m venv .venv
      
      source .venv/bin/activate # linux
      .\.venv/scripts/activate # windows
      
      pip install -r requirements.txt
  2. Copy creds.example.yml to creds.yml (or whatever you want.) and update the creds.

    cp creds.example.yml > creds.yml
    # MAIN NET
    prod:
        access_key: replace_me
        secret_key: replace_me
    
    # TEST NET
    test:
        access_key: replace_me
        secret_key: replace_me
  3. Configure input params as in config.yml

  4. Run the script

    • Standard
      python3 Binance\ Detect\ Moonings.py
    • Background process (linux only)
      nohup python3 -u Binance\ Detect\ Moonings.py >> log.txt 2>&1 &
      The logs are stored in log.txt. To stop the process either look in your process list with ps aux | grep -i python3 and kill with kill PROCESS_ID or killall python3 when you know what you're doing.
  5. Use the --help flag if you want to see supported arguments

Troubleshooting

  1. Read the FAQ
  2. Open an issue / check us out on #troubleshooting at Discord 🚀
    • Do not spam, do not berate, we are all humans like you, this is an open source project, not a full time job.
Comments
  • APIError(code=-2010): Account has insufficient balance for requested action.

    APIError(code=-2010): Account has insufficient balance for requested action.

    For some reason I don't understand yet - it could not sell the 2563 CKBUSDT it bought... through the binance interface i could only sell 2560 (but in the history it did buy 2563) ... does that make any sense?

    CKBUSDT has gained 5.143% in the last 5 minutes, calculating volume in USDT
     preparing to buy 2563 CKBUSDT
    TP or SL reached, selling 2563 CKBUSDT...
    APIError(code=-2010): Account has insufficient balance for requested action.
    
    opened by korsgaard 28
  • APIError(code=-1013): Filter failure: LOT_SIZE shows after new update.

    APIError(code=-1013): Filter failure: LOT_SIZE shows after new update.

    APIError(code=-1013): Filter failure: LOT_SIZE is a new error which happens after the sell_amount = coins_bought[coin]['volume']*99.25/100 is added. Some currencies are not able to be traded with this amount as they need a integer.

    opened by pekac45 16
  • No buy, sell, check after error in <module>, buy, convert_volume

    No buy, sell, check after error in , buy, convert_volume

    After some time Binance Detect Moonings.py throws the following error:

    External signal received on DGBUSDT, calculating volume in USDT
    [2021-05-18 13:31:09] External signal received on ENJUSDT, calculating volume in USDT
    Traceback (most recent call last):
      File "Binance Detect Moonings.py", line 497, in <module>
        orders, last_price, volume = buy()
      File "Binance Detect Moonings.py", line 239, in buy
        volume, last_price = convert_volume()
      File "Binance Detect Moonings.py", line 220, in convert_volume
        volume[coin] = float(QUANTITY / float(last_price[coin]['price']))
    KeyError: 'DGBUSDT'
    [2021-05-18 13:31:10] Signalsample: Signal detected on ETHUSDT
    

    After this, there's no additional buy, sell or even check if the price has changed.

    opened by zawhie 11
  • wait_for_price(): volatile_coins not a subset of last_price

    wait_for_price(): volatile_coins not a subset of last_price

    Consistently erroring out at line 274 in Binance Detect Moonings.py . with Key Error. Occurs when market conditions are good in attempt to initiate buys: Traceback (most recent call last): File ".\Binance Detect Moonings.py", line 600, in orders, last_price, volume = buy() File ".\Binance Detect Moonings.py", line 300, in buy volume, last_price = convert_volume() File ".\Binance Detect Moonings.py", line 281, in convert_volume volume[coin] = float(QUANTITY / float(last_price[coin]['price'])) KeyError: 'ADAUSDT'

    I printed out volatile_coins and last_price . Shoudn't volatile_coins be a subset of last_price? Majority of coins here do not exist in last_price.

    e.g.

    [2021-05-31 11:57:44] Working...Session profit:0.00% Est:$0.00 [2021-05-31 11:57:44] Signalsample:BCHUSDT First 14 Second 15 [2021-05-31 11:57:44] Signalsample: Signal detected on BCHUSDT [2021-05-31 11:57:44] Signalsample:UNIUSDT First 14 Second 15 [2021-05-31 11:57:44] Signalsample: Signal detected on UNIUSDT [2021-05-31 11:57:44] External signal received on BTCUSDT, calculating volume in USDT [2021-05-31 11:57:44] External signal received on ETHUSDT, calculating volume in USDT [2021-05-31 11:57:44] External signal received on BNBUSDT, calculating volume in USDT [2021-05-31 11:57:44] External signal received on ADAUSDT, calculating volume in USDT [2021-05-31 11:57:44] External signal received on DOTUSDT, calculating volume in USDT [2021-05-31 11:57:44] External signal received on BCHUSDT, calculating volume in USDT [2021-05-31 11:57:44] <class 'dict'> [2021-05-31 11:57:44] vc 0 : BTCUSDT [2021-05-31 11:57:44] vc 1 : ETHUSDT [2021-05-31 11:57:44] vc 2 : BNBUSDT [2021-05-31 11:57:44] vc 3 : ADAUSDT [2021-05-31 11:57:44] vc 4 : DOTUSDT [2021-05-31 11:57:44] vc 5 : BCHUSDT [2021-05-31 11:57:45] Signalsample:LTCUSDT First 17 Second 17 [2021-05-31 11:57:45] Signalsample: Signal detected on LTCUSDT [2021-05-31 11:57:45] <class 'dict'> [2021-05-31 11:57:45] lp 0 : BNBUSDT [2021-05-31 11:57:45] lp 1 : BTCUSDT [2021-05-31 11:57:45] lp 2 : ETHUSDT [2021-05-31 11:57:45] lp 3 : LTCUSDT [2021-05-31 11:57:45] lp 4 : XRPUSDT [2021-05-31 11:57:45] Signalsample:LINKUSDT First 11 Second 15 [2021-05-31 11:57:45] Signalsample:SOLUSDT First 12 Second 14 [2021-05-31 11:57:45] Signalsample: Signal detected on SOLUSDT [2021-05-31 11:57:46] Signalsample:ETCUSDT First 14 Second 15 [2021-05-31 11:57:46] Signalsample: Signal detected on ETCUSDT [2021-05-31 11:57:46] Signalsample:FILUSDT First 17 Second 16 [2021-05-31 11:57:46] Signalsample: Signal detected on FILUSDT [2021-05-31 11:57:47] Signalsample:EOSUSDT First 13 Second 15 [2021-05-31 11:57:47] Signalsample: Signal detected on EOSUSDT [2021-05-31 11:57:47] <class 'dict'> [2021-05-31 11:57:47] lp 0 : BNBUSDT [2021-05-31 11:57:47] lp 1 : BTCUSDT [2021-05-31 11:57:47] lp 2 : ETHUSDT [2021-05-31 11:57:47] lp 3 : LTCUSDT [2021-05-31 11:57:47] lp 4 : XRPUSDT [2021-05-31 11:57:47] Signalsample:XMRUSDT First 16 Second 17 [2021-05-31 11:57:47] Signalsample: Signal detected on XMRUSDT [2021-05-31 11:57:47] Signalsample: Max signal by LTCUSDT at 17 on shortest timeframe [2021-05-31 11:57:47] Signalsample: 14 coins above 12 treshold on both timeframes. Waiting 1 minutes for next analysis [2021-05-31 11:57:47] <class 'dict'> [2021-05-31 11:57:47] lp 0 : BNBUSDT [2021-05-31 11:57:47] lp 1 : BTCUSDT [2021-05-31 11:57:47] lp 2 : ETHUSDT [2021-05-31 11:57:47] lp 3 : LTCUSDT [2021-05-31 11:57:47] lp 4 : XRPUSDT [2021-05-31 11:57:48] <class 'dict'> [2021-05-31 11:57:48] lp 0 : BNBUSDT [2021-05-31 11:57:48] lp 1 : BTCUSDT [2021-05-31 11:57:48] lp 2 : ETHUSDT [2021-05-31 11:57:48] lp 3 : LTCUSDT [2021-05-31 11:57:48] lp 4 : XRPUSDT Traceback (most recent call last): File ".\Binance Detect Moonings.py", line 600, in orders, last_price, volume = buy() File ".\Binance Detect Moonings.py", line 300, in buy volume, last_price = convert_volume() File ".\Binance Detect Moonings.py", line 281, in convert_volume volume[coin] = float(QUANTITY / float(last_price[coin]['price'])) KeyError: 'ADAUSDT'

    Here is my config: { "script_options": { "TEST_MODE": true, "LOG_TRADES": true, "LOG_FILE": "trades.txt",
    "AMERICAN_USER": true }, "trading_options": { "PAIR_WITH": "USDT", "QUANTITY": 15, "FIATS": [ "EURUSDT", "GBPUSDT", "JPYUSDT", "USDUSDT", "DOWN", "UP" ], "MAX_COINS": 7, "TIME_DIFFERENCE": 1, "RECHECK_INTERVAL": 60, "CHANGE_IN_PRICE": 10, "STOP_LOSS": 0.18, "TAKE_PROFIT": 0.6, "CUSTOM_LIST": true, "TICKERS_LIST": "tickers.txt", "USE_TRAILING_STOP_LOSS": false, "TRAILING_STOP_LOSS": 0.4, "TRAILING_TAKE_PROFIT": 0.1, "TRADING_FEE": 0.075, "SIGNALLING_MODULES": [ "pausebotmod", "signalsamplemod" ] } }

    opened by chadpete1989 8
  • Added functionality for external signals

    Added functionality for external signals

    Created subfolder signals Any file with extention .exs will be picked up and parsed It should be a text file with a list of pairs to be traded. The file will be removed after it has been picked up

    opened by ShogunMan 8
  • IndexError: list index out of range

    IndexError: list index out of range

     ETHUSDT has gained 21.425% in the last 5 minutes, calculating volume in USDT
     preparing to buy 0.26192 ETHUSDT
    Traceback (most recent call last):
      File "/Users/miguelstevens/Desktop/bot/Binance Detect Moonings.py", line 299, in <module>
        update_porfolio(orders, last_price, volume)
      File "/Users/miguelstevens/Desktop/bot/Binance Detect Moonings.py", line 267, in update_porfolio
        'symbol': orders[coin][0]['symbol'],
    IndexError: list index out of range
    

    Received this error, the console has been open for about an hour, all default settings are there, using testnet as well.

    opened by notflip 8
  • Code Refractoring

    Code Refractoring

    I've made it more modularised and refactored certain parts. It will now be easier to create custom signal modifiers. It is not complete yet, there are some other parts that needs to be refactored. The testnet feature is added again but it will only work if it is enabled in the config file. The creds file is also modified to store both testnet and mainnet keys.

    The test_mode feature remained unchanged and it is not affected by testnet.

    opened by Anu-bhav 7
  • Did i forgot something?

    Did i forgot something?

    Traceback (most recent call last): File "C:\Users\USER\Documents\binance_bot_v3\Binance-volatility-trading-bot-main\Binance_Detect_Moonings.py", line 396, in orders, last_price, volume = buy() File "C:\Users\USER\Documents\binance_bot_v3\Binance-volatility-trading-bot-main\Binance_Detect_Moonings.py", line 157, in buy volume, last_price = convert_volume() File "C:\Users\USER\Documents\binance_bot_v3\Binance-volatility-trading-bot-main\Binance_Detect_Moonings.py", line 117, in convert_volume volatile_coins, number_of_coins, last_price = wait_for_price() File "C:\Users\PUSER\Documents\binance_bot_v3\Binance-volatility-trading-bot-main\Binance_Detect_Moonings.py", line 66, in wait_for_price while initial_price['BNB' + PAIR_WITH]['time'] > datetime.now() - timedelta(seconds=TIME_DIFFERENCE): KeyError: 'BNBEUR'

    (I put api keys only for test)

    opened by twofacednine380 7
  • Adding Telegram Bot in order to receive updates

    Adding Telegram Bot in order to receive updates

    Hey guys,

    It would be great to have a telegram bot sending messages in order to keep yourself updated. What do you think? I could implement the solution in the next few days but not sure if it's a useful feature except for me.

    opened by hExPY 7
  • 'NoneType' object has no attribute 'encode'

    'NoneType' object has no attribute 'encode'

    I get the following when the script tries to buy:

    RLCUSDT has gained 9.972% in the last 5 minutes, calculating volume in USDT CTXCUSDT has gained 7.022% in the last 5 minutes, calculating volume in USDT TRBUSDT has gained 3.737% in the last 5 minutes, calculating volume in USDT preparing to buy 9.17 RLCUSDT 'NoneType' object has no attribute 'encode' preparing to buy 175.99 CTXCUSDT 'NoneType' object has no attribute 'encode' preparing to buy 0.77 TRBUSDT 'NoneType' object has no attribute 'encode'

    The coins_bought.json is there but only has "{}" written in it

    opened by Dogepot2 7
  • Stop loss and Take Profit

    Stop loss and Take Profit

    Hi there, Why is the stop loss not in decimals, but the take profit is. Initially, the stop loss was at 4 and the take profit was at 0.8. Is this a typo or an integral part of the program ?

    opened by aadam5888 6
  • Text notifications

    Text notifications

    I also added code to send me a text message to notify me when there's a buy, and when there's a sell which includes profit % and $. If you're interested happy to send. Great job on this.

    opened by birk151 0
  • Market vs limit sell, recommended code change

    Market vs limit sell, recommended code change

    Cannot trade profitably with low volume coins. Market sell orders trigger at TP, but will often sell for less then the buy price due to low volume.

    Suggest changing sell parameter to:

                if not TEST_MODE:
                    sell_coins_limit = client.create_order(
                        symbol = coin,
                        side = 'SELL',
                        type = 'LIMIT',
                        price = coins_bought[coin]['take_profit']
                        timeinForce = 'GTC',
                        quantity = coins_bought[coin]['volume']
    
                    )
    

    This of course eliminates the trailing profit function but will guarantee the sale price to be the TP as intended.

    opened by birk151 0
  • First handler: <tradingview_ta.main.TA_Handler object at 0x000001EB230D4BB0>

    First handler:

    Hello, does anyone have this problem?

    First handler: <tradingview_ta.main.TA_Handler object at 0x000001EB230D4BB0> Second handler: <tradingview_ta.main.TA_Handler object at 0x000001EB230D5B10>

    THANKS !

    opened by 000KeyserSoze000 0
  • Your API key is either incorrect, IP blocked, or incorrect tld/permissons...

    Your API key is either incorrect, IP blocked, or incorrect tld/permissons...

    Im getting error. What must i do ?

    Your API key is either incorrect, IP blocked, or incorrect tld/permissons... most likely: Your API key is not formatted correctly... If you are in america, you will have to update the config to set AMERICAN_USER: True If you set an IP block on your keys make sure this IP address is allowed. check ipinfo.io/ip

    opened by tanerik 3
Owner
Andrei
Crypto enthusiast. Love nerding out on blockchain tech. I build and test crypto trading bots. Meme Savvy 69/10.
Andrei
This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. If you like this project please consider donating via brave. Thanks.

This is a cryptocurrency trading bot that analyses Reddit sentiment and places trades on Binance based on reddit post and comment sentiment. The bot f

Andrei 157 Dec 15, 2022
This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio

gateio-trading-bot-binance-announcements This Gateio x Binance cryptocurrency trading bot scans the Binance Announcements page and picks up on new coi

Andrei 1.2k Jan 1, 2023
Cryptocurrency Trading Bot - A trading bot to automate cryptocurrency trading strategies using Python, equipped with a basic GUI

Cryptocurrency Trading Bot - A trading bot to automate cryptocurrency trading strategies using Python, equipped with a basic GUI. Used REST and WebSocket API to connect to two of the most popular crypto exchanges in the world.

Francis 8 Sep 15, 2022
Crypto trading bot that detects surges in the bitcoin price and executes trades.

The bot will be trading Bitcoin automatically if the price has increased by more than 3% in the last 10 minutes. We will have a stop loss of 5% and t

null 164 Oct 20, 2022
A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API

Bzzmans New Coin Listing Detection Bot Architecture About Project Work in progress. This bot basically gets new coin listings from Binance using Binan

Eyüp Barlas 21 May 31, 2022
Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Dr Asad Ali 6 Jun 20, 2022
Trading bot - A Trading bot With Python

Trading_bot Trading bot intended for 1) Tracking current prices of tokens 2) Set

Tymur Kotkov 29 Dec 1, 2022
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

?? Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements ?? FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls ?? Get

levina 143 Jun 19, 2022
E0 AI Bot is based on the message, it prints the answer with the highest probability using probability from the database.

E0 AI Chat Bot Based on the message, it prints the answer with the highest probability using probability from the database. Install on linux (Arch,Deb

Error 27 Dec 3, 2022
A muti pairs martingle trading bot for Binance exchange.

multi_pairs_martingle_bot English Documentation A muti pairs martingle trading bot for Binance exchange. Configuration { "platform": "binance_futur

51bitquant 62 Nov 16, 2022
This is a DCA crypto trading bot built for Binance written in Python

This is a DCA crypto trading bot built for Binance written in Python. It works by allowing you to DCA at an interval of your choosing and reports back on your average buy price as well as a chart consisting of each DCA.

Andrei 55 Oct 17, 2022
Telegram Radio - A User-bot who continuously play random audio files (from the famous telegram music channel @mveargasm) in the intended voice chat.

MvEargasmDJ: This is my submission for the Telegram Radio Project of Baivaru. Which required a userbot to continiously play random audio files from th

eyaadh 24 Nov 12, 2022
Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Intelligent Trading Bot: Automatically generating signals and trading based on machine learning and feature engineering

Alexandr Savinov 326 Jan 3, 2023
Telegram bot that let's you flip a coin in a dialog

coin_flip Telegram bot that let's you flip a coin in a dialog Report issue · Request feature About Software development tool that lets you finally dec

Ivan Akostelov 2 Dec 12, 2021
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
Utilizing the freqtrade high-frequency cryptocurrency trading framework to build and optimize trading strategies. The bot runs nonstop on a Rasberry Pi.

Freqtrade Strategy Repository Please test all scripts and dry run them before using them in live mode Contact me on discord if you have any questions!

Michael Fourie 90 Jan 1, 2023
This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners and alerts system.

Python Trading Bot w/ Thinkorswim Description This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners

Trey Thomas 201 Jan 3, 2023
Rocks vc Userbot: A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group

⭐️ Rocks VC Userbot ⭐️ Telegram Userbot To Play Audio And Video Song On VC Chat

Dr Asad Ali 10 Jul 18, 2022