Skip to content

RayZYunYan/Stock_Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Search Web Application (CS174 HW7)

This is a Flask-based web application that allows users to search for stock information using the Tiingo API. It supports live data retrieval, search history tracking, and result caching for improved performance.

Features

  • Search by stock ticker symbol
  • Company Outlook tab (name, exchange, start date, description)
  • Stock Summary tab (prices, volume, changes with visual arrows)
  • Search History tab (last 10 searches saved to SQLite)
  • 15-minute result caching to reduce API calls
  • Input validation and inline error messages
  • Fully deployed on AWS EC2 (Ubuntu 22.04)

Live Demo

http://54.83.74.110:8000

Make sure the EC2 instance is running and the app is live.

File Structure

project/
├── app.py # Main Flask app
├── init_db.py # (Optional) One-time DB table creator
├── search_history.db # SQLite database (auto-created)
├── templates/
│ └── index.html # Main HTML page with JS and tabs
├── static/
│ └── images/
│ ├── GreenArrowUP.png
│ └── RedArrowDown.png
└── flask_stock_search.zip # Deployment bundle (optional)

How to Run (on EC2)

  1. SSH into your EC2 instance
  2. Navigate to your project directory
  3. Activate the virtual environment
  4. Run the Flask app

cd ~/Stock_Search
source ~/venv/bin/activate
python3 app.py

Make sure the last line of your app.py is: app.run(host="0.0.0.0", port=8000)

The Flask app will be available at:
http://:8000

API Source

Tiingo API: https://api.tiingo.com/

Author

Ray Zhang
San José State University — CS174 Spring 2025
Deployed using Flask + EC2 + SQLite

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors