Trading bot that uses Elon Musk`s tweets to know when to buy cryptocurrency. Here is how it works:
- Subscribes to someone's (elonmusk?) tweets
- Automatically detects mentions of DOGE or other crypto in the image(or text)
- Buys crypto on Binance
- Sells it after
--auto-sell-delay
seconds
git clone http://github.com/vslaykovsky/elonbot
pip install python-binance google-cloud-vision unidecode
- Set up Twitter access keys.
- Go to developer.twitter.com to create your developer account
- Generate a bearer token
- Set up an environment variable with the bearer token:
export TWITTER_BEARER_TOKEN=<YOUR BEARER TOKEN>
- Set up Binance access keys.
- Go to Binance and create a trader account if you don't have it yet
- Go to API management page and copy your API key and secret
- Export both keys:
export BINANCE_KEY=<your API key>; export BINANCE_SECRET=<your secret key>
- [Optional] Add image text recognition support with Google OCR
- Use the following documentation to access Google Vision API
- Export path to your google vision configuration:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/google_vision_credentials.json
- Run elonbot.py
Here are some examples of how to run Elonbot.
With image text recognition:
python elonbot.py --user=elonmusk --margin-type=cross_margin --crypto-rules='{"doge": "DOGE", "btc|bitcoin": "BTC"}' --auto-sell-delay=600 --order-size=max --use-image-signal
No image text recognition
python elonbot.py --user=elonmusk --margin-type=cross_margin --crypto-rules='{"doge": "DOGE", "btc|bitcoin": "BTC"}' --auto-sell-delay=600 --order-size=max
Dry run (only prints debug output, no orders are executed)
python elonbot.py --user=elonmusk --margin-type=cross_margin --crypto-rules='{"doge": "DOGE", "btc|bitcoin": "BTC"}' --auto-sell-delay=60 --order-size=max --dry-run