This script fetches the latest stock prices from Yahoo Finance and sends the information via SMS using Twilio. You can customize the stocks to monitor and receive real-time stock updates on your phone.
- Fetches stock prices from Yahoo Finance using
pandas_datareader. - Sends SMS notifications through Twilio.
- Easily customizable stock symbols and phone numbers.
- Python 3.7+
- A Twilio account (for sending SMS)
- Twilio credentials (account SID, auth token, Twilio number)
- Internet connection
- Clone the repository:
git clone https://github.com/UmanSheikh/Stock-Alert.git- Navigate to the project directory:
cd Stock-Alert- Install the required Python packages:
pip install pandas_datareader twilio- Sign up for a Twilio account and get your Account SID, Auth Token, and Twilio phone number.
- Edit the
send_smsfunction in the script and replace the following with your credentials:account_sid = "Your ID From Twilio"auth_token = "Auth Token From Twilio"sending = 'Twilio Number'reciving = 'Your Recinving Number'
- Run the script:
python script.pyThe script will fetch stock prices of the listed companies and send them via SMS.
- You can change the stock symbols to monitor by editing the
stockslist in themain()function:
stocks = ["AAPL", "JPM", "GOOGL", "SBUX"]Simply add or remove stock symbols as per your needs.