Skip to content

Compote05/B-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B-Bot logo

B-Bot

A Binance bot that buys new cryptocurrencies.

  • Uses WebSockets for better performance. 🚀
  • Semi-automatic bot. 🤖

Features

  • Help to configure your API key
  • Choose the cryptocurrency you want to monitor
  • Set the time at which you want the code to launch.
    • This option will likely change.
  • Executes trades only in USDT

Resource Table

Resource Links
💿 Installation Installation
📚 How to use How to use
🔑 Binance API Key Binance API Key
Coming soon Coming soon
📰 General Information General Information
📑 Additional Information Additional Information

Installation

This code has been tested on Windows 10 with Python 3.10.X

  1. Install the necessary dependencies
pip install -r requirements.txt
  1. Run the code
    • You can launch it either with the launch.bat file or in a terminal with the following command:
python main.py

How to use

  1. At first, you will be asked for the API key. Just follow the instructions; if you don't have an API key, the process is explained below
  2. Then, once the API keys are validated, you will need two pieces of information:
    • The name of the upcoming new listing
    • The date on which the new listing will be available
  3. Once these pieces of information are known, enter the pair name (case insensitive, and do not add USDT as it will be added automatically)
    • [❌] BTCUSDT, btcusdt
    • [✔] BTC, btc
  4. Next, for the date, I recommend setting it to 20 seconds before the arrival of the new listing, for example:
    • For example, if the pair is scheduled to be listed at 10:00 AM
    • You should set it to 9:59:40
    • The 20 seconds will be dedicated to launching the WebSocket; this manipulation will be corrected in future versions
  5. Once all these parameters are entered, you just have to wait for the bot to buy as soon as it receives information about the new pair
  6. It is crucial to keep the program open until the end; otherwise, the purchase of the new pair will not occur (unless you want to stop the program with CTRL+C)

Binance API Key

For Binance API keys, you can follow this link that explains how to obtain them: How to Create API Keys on Binance?

Additionally, it is necessary to activate the Trade permission. You will need to whitelist your IP first to secure the use of your API keys. To find out your IP, you can use one of the following two sites:

Make sure to take the IPv4 and not the IPv6 because Binance does not accept IPv6. It should look something like this: 8.8.8.8.

IP

Don't forget to authorize trades, otherwise, the bot will return an error during the buy order.

  • The other parameters are not necessary.

Trading

Coming soon

  • Possibility to set the amount in USDT for the buy order.
  • Write a more organized code
  • Subtract 10 seconds from the requested launch time of the code (WebSocket launch time)

General Information

Change the amount to be traded

  1. At the moment, the bot only allows trading on the USDT pair
  2. The amount to be placed in the buy order can be modified within the code for now
    • It is not recommended to set a value too high, as it may result in losses
amount_in_usdt = 5  # (Line 149) Change the value here to increase or decrease how much you want to buy on a dip (currently set to 5 USDT)
symbol_to_buy = pair_to_watch

order = client.create_order(
    symbol=symbol_to_buy,
    side=SIDE_BUY,
    type='MARKET',
    quoteOrderQty=amount_in_usdt,
)

Compatible versions:

  • [❌] Python 3.8.X
  • [✔] Python 3.9.X
  • [✔] Python 3.10.X
  • [✔] Python 3.11.X
  • [❌] Python 3.12.X

Additional information

Risk of using the trading bot

Trading bots come with inherent risks, and the volatile nature of the cryptocurrency market can lead to financial losses. Users should exercise caution, thoroughly understand the functionalities of the bot, and be aware that past performance is not indicative of future results. It is crucial to trade responsibly and only invest what one can afford to lose.

By using this code, you confirm that you have read and are aware of the Terms and Conditions, the latest version of which is dated 25/01/2024 and you accept the associated risks :

  • The high volatility of cryptocurrencies can result in the partial or complete loss of your capital.
  • You will be solely responsible for the loss of this capital. Neither I or anyone else will be required to reimburse the lost amount.
  • Do not use a large amount for the purchase, as you may risk losing a significant sum.

Seeking professional financial advice is recommended, especially for those unfamiliar with the complexities of trading. Remember that the cryptocurrency market is dynamic, and adjustments may be necessary to adapt to changing conditions. Please trade responsibly and be aware of the evolving nature of the crypto space.

About

A Binance bot that buys new cryptocurrencies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors