A Python-based automation system to track and alert stock prices from Groww via Email and WhatsApp, with real-time updates every 15 minutes and a daily summary at 9:17 AM IST.
- ✅ Scrape real-time stock name and price from Groww using Selenium
- ✅ Store previous day’s stock price at 4:00 PM
- ✅ Send daily summary email and WhatsApp message at 9:17 AM with:
- Current Price
- Yesterday's Price
- ₹ Difference and % Change
- ✅ Send 15-minute interval alerts during market hours (9:00 AM - 4:00 PM)
- ✅ Environment variable-based configuration
- ✅ Modularized code: mail and WhatsApp functionality in separate files
git clone https://github.com/your-username/stock-price-alert.git
cd stock-price-alert
pip install -r requirements.txt
Create a .env file and fill it with your credentials:
EMAIL_SENDER = [email protected]
APP_PASSWORD = app_pass_from_gamil
RECEIVER_EMAIL = [email protected], [email protected]
ACCOUNT_SID = your_account_sid
AUTH_TOKEN = twilio_auth_token
RECIPIENT_NAME = your_name
RECIPIENT_NUMBER = +91xxxxxxxxxx
TWILIO_WHATSAPP_NUMBER = +14xxxxxxxxxx
💡 Gmail users need to generate an App Password from their Google Account if 2FA is enabled.
Subject: IRCON Daily Summary
Hello Rishabh Dhawad,
📈 Stock Alert:
✨ IRCON
✨ Current Price: ₹203
✨ Yesterday Price: ₹200
✨ Difference: ₹3.00 (+1.50%)
Stay updated and invest wisely!
- Python 3
- Selenium – Web scraping
- BeautifulSoup – HTML parsing
- Twilio API – WhatsApp messaging
- SMTP – Email notifications
- APScheduler – Task scheduling
- dotenv – Environment variable management
- Make sure ChromeDriver is compatible with your Chrome version.
- This script uses headless Chrome; ensure your system supports it.
- Run the script continuously (e.g., with a server or as a background service) to allow the scheduler to function properly.
python main.py
You’ll see scheduled tasks begin at their respective times. Press Ctrl + C to stop the scheduler.
This project is licensed under the MIT License.
Made with ❤️ by Rishabh Dhawad
Feel free to reach out or contribute!