- Listen for tweets from @officialmcafee
- Check if tweet contains a symbol listed on Bittrex
- Analyze sentiment
- Suggest to user via Telegram bot if good
- Allow user to make buy order and set selling target once buy order fills
APIs used:
- Twitter (tweepy)
- Telegram (telepot)
- Bittrex (python-bittrex)
If you get stuck, don't hesitate to open an issue or message me on Twitter @stephancill
Disclaimer: I do not endorse the influence McAfee’s tweets have on the crypto market. I think it’s very dangerous for one person to have the power to manipulate markets the way he does.
- OCR for tweets with pictures
- Set default amount to buy in config
- Timed orders (e.g. sell after 30 min)
- General order management (/neworder)
A stream is configured to listen to new tweets by user IDs specified in config.json
. When it receives a tweet, it checks if any coins that trade on Bittrex are mentioned, analyzes the overall sentiment and determines which coins you should buy. The Telegram bot then sends you a message with those buying options and allows you to inspect a market summary of all the buying options. Along with the market summary, it provides you with a button that you can press to buy the coin on Bittrex and asks you to specify how much (in BTC) you would like to spend and places a buy order at the asking price.
McAfee doesn't only tweet the coin of the day. A Telegram bot is merely a conservative approach to prevent the bot from making stupid trades. E.g.
- Python 3.6
- pipenv
git clone https://github.com/stephancill/mcafee2cash.git
cd mcafee2cash
pipenv install
(if this fails, deletePipfile.lock
and try again)pipenv run "python -m textblob.download_corpora"
to download sentiment analysis dependencies- Populate
secrets.json
- Modify
config.json
(optional)
- Bittrex - Create a Bittrex API key with
READ INFO, TRADE LIMIT, TRADE MARKET
permissions - Telegram - Create a bot by talking to @BotFather
- Twitter - Create a new Twitter app at https://apps.twitter.com/app/new
Command shortcuts to register with BotFather
orderstatus - Usage: /orderstatus ORDER_UUID (Get status of limit order)
cancelorder - Usage: /cancelorder ORDER_UUID (Cancel order)
getopenorders - Usage: /getopenorders (List open orders)
help - Get help with order management
- Start the service using
pipenv run python main.py
- Send your bot token to the bot to authenticate your chat
- Wait for McAfee to pump a coin
Contributions welcome. Open a pull request!
MIT License