Skip to content

Latest commit

 

History

History
66 lines (58 loc) · 2.66 KB

README.md

File metadata and controls

66 lines (58 loc) · 2.66 KB

Stock News

Overview

This Python project fetches stock data and news articles related to a specified company and sends SMS alerts via Twilio when there is a significant change in the stock price. It utilizes APIs from Alpha Vantage for stock data, News API for news articles, and Twilio for SMS messaging.

Features

  • Fetches daily stock data from Alpha Vantage API.
  • Retrieves news articles related to the specified company from News API.
  • Sends SMS alerts via Twilio when the stock price change exceeds a specified threshold.
  • Utilizes environment variables for API keys and endpoints for enhanced security.

How the Project Works

  1. Retrieves daily stock data for a specified company using the Alpha Vantage API.
  2. Calculates the percentage difference in the stock price between two consecutive trading days.
  3. If the percentage difference exceeds a specified threshold (e.g., 5%), fetches news articles related to the company using the News API.
  4. Sends SMS alerts via Twilio with the headline and brief description of the top news articles.

Installation Guide

Clone the Repository

git clone https://github.com/Manjunathhs-0003/Stock-News
cd Stock-News

Usage

  1. Set up environment variables for the required API keys and endpoints.
  2. Run the Python script main.py.
  3. python main.py

APIs Used

  • Alpha Vantage:
    • Endpoint: Alpha Vantage
    • Documentation: Navigate to the Alpha Vantage website, sign up for an account, and obtain the API key from the dashboard or API section.
  • News API:
    • Endpoint: News API
    • Documentation: Visit the News API website, sign up for an account or log in, and obtain the API key from the dashboard or API section.
  • Twilio:
    • Endpoint: Twilio
    • Documentation: Go to the Twilio website, sign up for an account, obtain the Account SID and Auth Token from the dashboard, and set up a virtual phone number.