Originally forked from https://github.com/alighazi/price_alert_bot
- Get current price of Coins with its respective candle chart (various timeframes)
- Get alert notification when price of desired coin is above or below your target level
Notifications
List of Followed Coins
Price of Coin
Important Note Uptime: ~24/7 Downtime: ~ 2 Days (sometimes due to high traffic of API)
Rough Steps
- Create EC2 Instance using t2-Micro
- Generate your putty private file (.ppk) using puttyGen.exe
- Connect to your EC2 Instance with putty.exe using ubunutu@IPv4 address
- Create an extra screenn session using "screen -S New"
- After running your python file, detach the screen using "Ctrl + A + D"
- Logout of terminal using "Ctrl + A + D"
- To reconnect to your Bot console, use "screen -r {window name that you created before}
- Ctrl + C to terminate the bot and update it (remember to git pull/push)
- Error: Running py file
python3 -m tg_bot_service (without .py extension)
- Error: Importing ParseMode from Telegram
pip install python-telegram-bot --upgrade
- Error: KeyError"Coin"
This is due to hitting the Rate Limit of CryptoCompare API.
Add throttle function to before each API function to reduce the frequency of calls. I use this ratelimit library
- Error: pip3 module not found
This happens if you terminate your EC2 instance and relaunch a new server. You need to re-setup your ubuntu installation.
sudo apt-get update
sudo apt-get install python3-pip
git clone "github repo"
cd "folder"
pip3 install -r requirements.txt
pip install "any other missing modules"
python3 -m tg_bot_service
- Ctrl + A + D (to detach screen)
- screen -list (to see all sessions)
- screen -dr SCREENID (to reattached screen)