This repository automatically fetches and publishes OCGN (Ocugen Inc.) stock price data as an Atom feed, updated every 15 minutes.
The Atom feed is publicly accessible at:
- Feed URL: https://cm-fy.github.io/ocgn-stock-feed/feed.atom
- Web Interface: https://cm-fy.github.io/ocgn-stock-feed/
- Real-time Updates: Fetches stock prices every 15 minutes
- Extended Hours: Includes pre-market and after-hours trading data
- Atom Feed Format: Standard feed format compatible with all RSS/Atom readers
- Automatic Publishing: Uses GitHub Actions to automatically update and publish
- GitHub Pages Hosting: Publicly accessible feed hosted on GitHub Pages
- GitHub Actions Workflow: A scheduled workflow runs every 15 minutes
- Data Fetching: The Python script uses yfinance to fetch OCGN stock data including extended hours
- Feed Generation: Stock data is formatted into an Atom feed (XML)
- Auto-Commit: Updated feed is committed to the repository
- GitHub Pages: The feed is automatically deployed to GitHub Pages
Each feed entry includes:
- Current stock price
- Previous close
- Price change and percentage
- Market state (PRE, REGULAR, POST, CLOSED)
- Latest trading data (Open, High, Low, Close, Volume)
- Extended hours information
- Timestamp
- Python 3.11: For data fetching and feed generation
- yfinance: Yahoo Finance API wrapper for stock data
- GitHub Actions: Automated workflow execution
- GitHub Pages: Static site hosting
fetch_stock_feed.py: Python script that fetches data and generates the feed.github/workflows/update-feed.yml: GitHub Actions workflow configurationrequirements.txt: Python dependenciesdocs/feed.atom: Generated Atom feeddocs/index.html: Web interface for the feed
Add the feed URL to your favorite RSS/Atom reader:
https://cm-fy.github.io/ocgn-stock-feed/feed.atom
You can manually trigger the workflow from the Actions tab in GitHub.
# Install dependencies
pip install -r requirements.txt
# Run the script
python fetch_stock_feed.pyThe workflow runs on the following schedule:
- Frequency: Every 15 minutes
- Cron Expression:
*/15 * * * *
To modify the schedule, edit the cron expression in .github/workflows/update-feed.yml.
This project is open source and available for public use.
This feed provides stock price information for informational purposes only. It should not be considered as financial advice. Always consult with a qualified financial advisor before making investment decisions.
Stock data is sourced from Yahoo Finance via the yfinance library.