This Binance trading bot will check Elon Musks twitter feed for tweets about Dogecoin, if the tweet is positive, the bot will buy $25 of Dogecoin. You can also specify how long until you would like the bot to sell the $25 of Dogecoin that it bought.
On startup, the bot checks for a new Elon Musk tweet every 60 seconds. If found, the bot analyzes the tweet and first checks if the tweet is positive, if it is, it checks if the tweet contains these 3 keywords; ['doge', 'dogecoin', 'crypto']
, if it does it sends a Binance order request. In the order request function we first get the price of DOGE and calculate how much of it $25 can buy, once that's done we send an order request to binance. The script will then cool down for exactly 4 minutes (this is to ensure the bot doesn't create multiple orders for the same tweet).
- Twitter Developer api.
- Binance account with an API
- By using this bot, you will be using REAL money.
- To test the bot out change
client.create_order()
toclient.create_test_order()
- You can provide an option for the bot to sell after a certain amount of time in minutes.
-
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
-
# Binance
BINANCE_API=
BINANCE_SECRET=
# Twitter
CONSUMER_KEY=
CONSUMER_SECRET=
ACCESS_TOKEN=
ACCESS_TOKEN_SECRET=
-
Standard
python3 dogebot.py
-
With
--time_to_sell
argumentpython3 dogebot.py --time_to_sell=2 # --time_to_sell argument represents the amount of minutes until the bot sells the $25 of DOGE it bought. If you don't want the bot to sell, then run the standard command.
You can host the bot on any service you'd like. If you want to host this on Heroku, follow the steps below.
- Heroku
- Create a Heroku account and project
- Upload the files to heroku
- Configure dyno worker and ensure the dogeboy.py worker is running.
Please create a pull request and I will try to get back to you as soon as possible.