PS: Docker version will be pushed shortly
- Clone the project using git
git clone https://github.com/thirt33n/price_tracker.git
- Install the requirements
pip install -r requirements.txt
- Install Redis On your system, if on Debian-Based system run the following comand:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
If not on debian system check the redis documentation for installation steps.
To start the development server run the following
cd price_tracker
python manage.py runserver
This starts the django server on port 8000
Navigate to http://127.0.0.1:8000/api/alerts to view all the alerts created.
Fill the form below to create your alerts.
To Start redis server and Celery worker and beat processes run the following commands in different terminal windows:
redis-server
redis-cli ping #to Check if the redis server is up and running
For Celery
celery -A price_tracker worker -l info
celery -A price_tracker beat -l info
To start the alert background process click on the Extra Options button at the top and click on Check option
It uses Binance Web Socket to fetch the average Price of Bitcoin in USD every 2 minutes and checks for created alerts whose target price is more than the current bitcoin value.
Once this is found, it uses Redis message broker to send an email alert to the particular user's registered email about the current BTC price.
demo_tracker_compress.mp4
P Siddharth