moon-doge is a PHP bot that will buy DogeCoin on Binance when Elon Musk mention DogeCoin on twitter.
Be aware that this is for educational purposes only
Every second it will check the occurence of DogeCoin inside Elon's last tweet. When found, it will automatically buy DogeCoin on Binance. It will convert all the available USDT in the futures wallet of your Binance account (unless you have set AMOUNT) into Doge with the leverage you will have previously set for DOGEUSDT Perpetual. It will also automatically sell when the price hit the target (defined by "TARGET").
It is best to have a dedicated Binance account only for this script. You will need to create an API key on Binance with Futures enabled. Also a twitter API Key and secret.
The script needs those 2 dependencies :
- CCXT : https://github.com/ccxt
- twitter-api-php from https://github.com/J7mbo/twitter-api-php
Set the variables :
BINANCE_API_KEY // your binance API Key (enable futures)
BINANCE_SECRET // your binance API Key secret
TWITTER_API_KEY // twitter API Key
TWITTER_SECRET // twitter API Key secret
TARGET // target price in percent
AMOUNT // set the amount USDT (if empty it will take the available funds)
Before to run the scipt in production, make sure that your Binance configuration will work. To do so, uncomment the line
//check_binance(); exit;
then run the script in terminal.
This will check :
-
your Binance keys
-
The Binance API connection
-
Your USDT balance
Run in terminal :
php doge.php
-
you can now define AMOUNT
-
check if the tweet is recent (< 1 minute) in case we start the script and Elon last tweet have mentioned dogecoin but it is too late
-
added check_binance(); function