Skip to content

About

A sample stock ticker web application for demos in Coder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Ticker Application

A simple, real-time stock ticker web application that displays simulated price updates for the top 50 S&P 500 companies.

Stock Ticker Screenshot

Features

  • Real-time price updates for 50 major stocks
  • Dark, professional UI with scrollable stock list
  • Interactive line chart for comparing multiple stocks
  • Sort stocks by price (high/low), percentage change, or default order
  • Select up to 10 stocks to plot simultaneously on the chart
  • Visual indicators for price movements (green for up, red for down)
  • Pause/resume automatic updates
  • Manual refresh option
  • Configurable server port

Quick Start

Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)

Installation & Running

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application (default port 5000):
python app.py
  1. Open your browser and navigate to:
http://localhost:5000

Custom Port

To run on a different port, use the --port flag:

python app.py --port 8080

Then visit http://localhost:8080

Usage

  • The stock prices update automatically every 2 seconds with simulated market movements
  • Click Pause Updates to stop automatic refreshes
  • Click Refresh Now to manually update prices
  • Use the filter buttons at the top of the sidebar to sort stocks:
    • Default: Original order
    • Price High: Highest price first
    • Price Low: Lowest price first
    • % Change: Largest absolute percentage change first
  • Click on stock cards to add them to the comparison chart (up to 10 stocks)
  • Click again to remove stocks from the chart
  • Green borders indicate price increases, red borders indicate decreases

Technology Stack

  • Backend: Python with Flask
  • Frontend: Vanilla JavaScript with HTML5/CSS3
  • Charting: Chart.js
  • Data: Simulated price movements for demonstration purposes

Stock Data

The application includes 50 stocks from various sectors:

  • Technology (AAPL, MSFT, GOOGL, NVDA, etc.)
  • Healthcare (LLY, UNH, JNJ, etc.)
  • Financial Services (JPM, V, MA, etc.)
  • Consumer Goods (WMT, KO, PEP, etc.)
  • Energy (XOM, CVX, COP, etc.)
  • And many more...

Prices start at realistic values and fluctuate randomly between -2% and +2% per update to simulate market activity.

Notes

  • This is a demonstration application with simulated data
  • Price movements are random and do not reflect real market conditions
  • For production use with real data, integrate with a financial data API (e.g., Alpha Vantage, Yahoo Finance, IEX Cloud)

About

A sample stock ticker web application for demos in Coder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages