This is a server developed using FastAPI for subscribing / unsubscribing clients from stock prices notifications. Prices are retreived from RapidAPI via HTTP requests and email notifications to subscribers are sent using python smtp.
I was frustrated with not being able to find simple email based notifications of stock prices, so I made my own script to track the stocks that I like.
Additionally, I have observed that notifications within the third-party apps can easily get lost in the phone screen and missed, but if you receive email it will be clearly visible.
Finally, existing stock news apps sometimes fail to deliver about important stock movements and it is really tiresome to be checking the stock ticker every day tracking price action (AMC and GME investors would relate to this).
- python 3
- dotenv
- logging
- requests
- smtplib
- fastapi
- starlette
- uvicorn
- sqlalchemy
- smtplib
-
To use and start the server clone the repository and execute:
python3 main.py
-
Replace password and email variables in .env file:
SENDER_EMAIL
,MAIL_PASSWORD
,API_KEY
-
If using Gmail client you will need to enable less secure apps: https://hotter.io/docs/email-accounts/secure-app-gmail/
-
Create Rapid API account and get key from https://rapidapi.com/. Within Rapid API you need to subscribe to realstonks stock price information provider.