See how well you would do on the real stock market.
Start with a certain amount of virtual money. Buy and sell shares of NASDAQ-listed companies at real-time prices. See if you would make money by playing the real stock market.
🪧Note: This is final project for CS50: Introduction to Computer Science 2022. Boilerplate code was provided with the list of functionalities that needed to be implemented.
To gain access to current stock quotes.
-
Go to IEX Cloud and register by clicking 'Start a Free Trial' button: https://iexcloud.io/cloud-login#/register It will give you a seven-day trial period.
-
Select API Tokens and copy publishable token:
- Set environment variable:
bash:
export IEX_API_KEY="pk_..."
PowerShell:
set IEX_API_KEY="pk_..."
You can check if it is set correctly by typing:
echo $IEX_API_KEY
For front and backend integration.
pip install Flask
Support for server-side sessions.
pip install Flask-Session
For simplified SQL operation.
pip install cs50
For HTTP/1.1 requests handling.
pip install requests
Run flask:
flask --debug run
Flask will give you a link to the website. Open it in your browser:
Running on http://127.0.0.1:5000
You'll see a welcome screen, when you can register or log in:
This is a learning project. There is no need to develop it any further.
CC BY-NC-SA 4.0 Boilerplate code by Harvard's CS50 Creators.