Giter Site home page Giter Site logo

vincemburu / cs50-finance Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 865 KB

Flask web application that enables the user to "buy" and "sell" stocks

Python 54.07% CSS 1.18% HTML 44.75%
css flask html5 javascript python sqlite3 flask-session iex-api bootstrap5

cs50-finance's Introduction

CS50-Finance

Introduction

This is one of the assignments provided in CS50x - Introduction to Computer Science.

The goal of the exercise is to:

  • Implement a website that allow user to "buy" and "sell" stock and the following functions:
  • Complete the implementation of register, to enble the user to register for an account via a form.
  • Complete the implementation of quote, to enable the user to look up a stock’s current price.
  • Complete the implementation of buy, to enable the user to buy stocks.
  • Complete the implementation of index, to display an HTML table summarizing, for current logged in user, which stocks the user owns, the numbers of shares owned, the current price of each stock, and the total value of each holding (i.e., shares times price). Also display the user’s current cash balance along with a grand total (i.e., stocks’ total value plus cash).
  • Complete the implementation of sell, to enable the user to sell shares of a stock (that he or she owns).
  • Complete the implementation of history, to display an HTML table summarizing all of a user’s transactions ever, listing row by row each and every buy and every sell.

Apart from the function required and the built in function provided in this exercise, I added some of my own functions to the website:

  • Allow user to change their password
  • Allow the user to add more cash

If you want more information click here

Built With

  • HTML for website strcuture
  • Flask for backend development
  • Bootstrap for design
  • IEX API to get the stocks values in real time
  • sqlite3 for storing users information (username and hashed password) and the transaction record (bought or sold)

Website

Every user after registered will have $10000 by default

  • Login Page: Login Page

  • Register Page: Register Page

  • Index Page: This is the homepage of the website which also contains the History table of the user. Index Page

  • Quote Page (Input the stock symbol for checking the stock info): Quote Page

  • Quoted Page (The inputted stock symbol is displayed): Quoted Page

  • Buy page (Input the stock symbol and number of shares to buy): Buy Page

  • Bought Page (The bought stock is displayed at the history): Bought Page

  • Sell Page (Input the stock that you have bought in the drop-down list and input the number of shares to sell): Sell Page

  • Sold Page (The sold stock is displayed at the history): Sold Page

  • History page (Show all your action on the page such as sell, buy): History Page

  • Add Cash Page: Add Page

  • Added Cash Page: Added Page

  • Change Password (Allow user to change their password but cannot input the new password same as current password): Change Password

Reference

  • Bootstrap
  • W3School
  • Stack Overflow

cs50-finance's People

Contributors

vincemburu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.