This is a major re-write of binance-trading-bot-new-coins - credit for the idea goes to him.
In general, the price of a coin immediately increases for a few minutes the moment it is added to a new exchange. This trading bot detects these new coins as soon as they are listed and places buy order as soon as possible. The bot will then automatically sell the coin based on user defined TP, SL, or TSL percentages as the price of the con changes. Binance and FTX are currently supported.
Features include:
- Test mode
- Auto sell using Stop Loss, Take Profit, Trailing Stop Loss
- Discord and Telegram notifications
- Optional: Frontload requests towards the beginning of each minute
- Optional: Automatic speed adjustments to avoid API limitations (Binance)
It comes with a live and test mode, so naturally, use it at your own risk.
Feel free to join to discuss with others using the program: Join Discord
Speed is very important for this program to produce successful trades. The setup below is averaging ~0.05 seconds per iteration - if your local copy is much higher than this I would consider using this set up instead.
- Create an AWS account
- Choose
Asia Pacific (Tokyo) ap-northeast-1
region from menu at the top right - Search for
EC2
in the search bar.- Choose
Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
- Choose
t2.micro
. This is offered for free from AWS for a year - Choose
Review and Launch
and create the instance - Create an SSH Key. Download and save somewhere safe
- Choose
- Either SSH into instance or choose
connect
from the UI - Once in the instance:
- Run
sudo apt-get update
- Run
sudo apt-get install git
- Run
sudo apt install python3-pip
- Follow steps in Installation section.
- Run
Closing the SSH window will stop the process. To keep the program running after closing the SSH window, run the following:
- Run
sudo apt-get install screen
- Run
screen
- Run
python3 main.py
- Press
ctrl-a
thenctrl-d
(both windows and mac). This will run the program in the background. - To go back, run
screen -r
- Python 3.7+ is required
- Git clone the repo:
git clone https://github.com/cdalton713/trading-bot-new-coins
- Run
pip install -r requirements.txt
- Make copies/rename
auth.example.yml
andconfig.example.yml
and edit the files as necessary - Run
python main.py
. Follow any prompts.
Why? I realize this is slightly inconvenient, but I need some parts of this project for other things! Submodules allow me to share components across different projects.
git clone --recurse-submodules https://github.com/cdalton713/trading-bot-new-coins
- cd into directory
git submodule init
git submodule update
- cd into directory
git submodule init
git submodule update
You must have permissions to create a webhoook
on your chosen Discord server.
- Right-click the server icon
- Go to
Integrations
- Click
Create Webhook
- Choose an icon (optional), name, and channel
- Copy the
Webhook URL
and paste intoconfig.yml
underNOTIFICATION_OPTIONS -> DISCORD -> AUTH -> ENDPOINT
This is a bit more involved than Discord...
- Go to https://t.me/botfather and add the BotFather Bot
- Type
/newbot
- Choose a name for your bot
- Choose a username for your bot
- Carefully copy the
token
- Go to the chat you wish the bot to be in and add the bot. Add Member, then <your bot name>
- Type a message in that chat
- Visit this url:
https://api.telegram.org/bot<YourBOTToken>/getUpdates
where<YourBOTTOKEN>
is your token from step 5. - You should see a JSON response which has the chat id displayed. If the number is negative, keep the minus sign.
- Copy the token to
NOTIFICATION_OPTIONS -> TELEGRAM -> AUTH -> ENDPOINT
- Copy the chat id to
NOTIFICATION_OPTIONS -> TELEGRAM -> AUTH -> CHAT_ID
- Swap to multi-threading?
Notification service (Discord/Telegram)- Additional tests
- Additional Exchanges*
I would love contributors! Please send a pull request, and I will review it.
*If you plan to add support for additional exchanges, please review and follow the structure used for the FTX and Binance wrapper classes already implemented.
Please include any applicable stack traces and logs. There are currently two log files: errors.log
and verbose_log.log
. Please also attach any relevant information from these files.
-
2021-12-01:
- Skip upgrade check if upgrade parsing fails (#25).
-
2021-11-12:
- Check that Binance quantity is greater than $10.00
- Notifications for sold positions updated
-
2021-11-05:
- Various changes/fixes to when-to-sell calculations
- Verbose file formatting updated
- Additional tests for Binance
-
2021-11-04:
- Setup Binance TestNet for much better testing. Functionality seems to be working for each step now based on Binance API responses.
- ReadMe and Config Info updated
-
2021-10-11:
- Binance order price response fix
-
2021-10-05:
- Bugs with live Binance fixed
- Notifications moved into a submodule for other projects
-
2021-09-30:
-
2021-09-24:
Invalid Symbol
Binance error finally fixed (#4)!- Notifications for Discord and Telegram added
-
2021-09-16:
- New baseline - I've done a poor job tracking changes thus far.
Made a killing using this? Buy me a coffee!