This repository contains the code a Flask application that allows a user to add stock symbols and track them in the dashboard.
GET /register
: Renders the register pageGET /login
: Renders the login pageGET /search
: Takessym
parameter and fetches stock symbolsGET /timeseries
: Takessym
parameter and fetches timeseries stock valuesGET /dashboard
: Renders the dashboard pagePOST /register
: Creates a user in the databasePOST /login
: Creates a user session with existing userPOST /logout
: Logs out a user sessionPOST /save
: Takes asym
data parameter and saves it against a userPOST /remove
: Takes asym
data parameter and deletes it from the database
All the code is written in Python 3. The primary database is MongoDB. The dependencies can be installed by:
$ pip install -r requirements.txt
The stock market data is supplied by Alpha Vantage API. Before starting, get your API key and add it to the file stocktalk/config/dev.py
.
Activate the virtual environment.
$ source activate <venv>
The necessary development environment variables can be set by:
$ source dev.env
Once the environment is activated, run the app using:
$ flask run
A screenshot of the dashboard: