hi019 / stockme.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stock Trading Platform (Website)

Stock trading platform simulator to teach young kids about Finance/stock markets, uses IEX API to pull live stock prices from the NASDAQ.

Description

Tech Stack

  • Flask: Manages database executions, routing and function calls
  • HTML (Jinja) / CSS (Bootstrap): Used to render pages quickly and to make them look visually appealing
  • SQL
  • Python: Database executions, template rendering, function calls
  • IEX Cloud API: Pulls live stock prices from the NASDAQ

Challenges

  • Executing SQL queries according to the user's actions (buying stocks/selling stocks/fetching portfolio etc.)

Requirements

  1. Install Python (https://python.org/download/)
  2. Install SetupTools ($ pip install setuptools)
  3. Install pip ($ easy_install pip)
  4. Install Flask ($ pip install flask)
  5. Install cs50 module ($ pip install cs50)
  6. Install flask_session ($ pip install flask_session)
  7. Install requests ($ pip install requests)
  8. Create IEX API Access Token (see below)

Create API Access Token

  • Visit iexcloud.io/cloud-login#/register/.
  • Select the “Individual” account type, then enter your name, email address, and a password, and click “Create account”.
  • Once registered, scroll down to “Get started for free” and click “Select Start plan” to choose the free plan.
  • Once you’ve confirmed your account via a confirmation email, visit https://iexcloud.io/console/tokens.
  • Copy the key that appears under the Token column (it should begin with pk_).

How to run (must execute code everytime the program is ran)

  1. $ export API_KEY=value (where value is the generated key from the steps above) -- for UNIX shells
  • $ set API_KEY=value (where value is the generated key from the steps above) -- for windows
  1. $ flask run -- for UNIX shells
  • $ python app.py -- for windows

Features

Login Page

stockme-login-photo

Register Page

stockme-register-photo

Navbar

  • stockme.io/logo: Redirects user to the home page, can quote stock prices.
  • Buy: Redirects user to the buy page, can buy stocks.
  • Sell: Redirects user to the sell page, can sell stocks.
  • My Transactions: Redirects user to the transactions page, can view transaction history.
  • My Friends: Redirects user to the friends page, can add friends and view their portfolios.
  • My Portfolio: Redirects user to the portfolio page, can view their personal portfolio and its breakdown.
  • Log Out: Logs user out. stockme-navbar-photo

Home Page

stockme-home-photo

Buy Page

stockme-buy-photo

Sell Page

stockme-sell-photo

My Transactions Page

stockme-history-photo

My Friends Page

stockme-friends-photo

My Portfolio Page

stockme-portfolio-photo

About


Languages

Language:Python 51.2%Language:HTML 43.9%Language:CSS 5.0%