Try it here.
SimStocks gives users a risk-free way to learn about the stock market and practice investing. Users receive $100,000 in fake cash and can manage their portfolio by buying and selling stocks, informed by current and historic stock data supplied by Finnhub.
-
You will need to create an account. You can do that by clicking on the
Sign In or Create an Accountbutton, followed by the Sign Up button on the next page, and selecting a username and password. -
If you would prefer to try out the app without creating an account, you can sign in as a guest by clicking the 'GUEST' button on the home page. Guests will be able to view and interact with a pre-populated portfolio, but will not be able to buy or sell stocks.
-
New accounts will receive $100,000 in fake cash. Once you are signed in, you can search for and purchase your first stock. To do that, click the
Tradebutton in the top navigation bar or the highlighted 'Trade' text on the Home screen. You can search for a stock by its ticker symbol or by its name. Click on a stock to view more information about it. If you would like to purchase shares of the stock, enter the number of shares you would like to purchase and click on thePurchase Share(s)button to complete the transaction. -
Navigate to the
Portfoliopage to view your current holdings. You can click on a stock to view more information about it. If you would like to sell shares of the stock, enter the number of shares you would like to sell and click on theSell Share(s)button to complete the transaction. -
Check back in on your portfolio periodically to see how your stocks are performing!
- Written with HTML, CSS, and TypeScript, using the React framework.
- Setup was done using Vite as an alternative to Create React App, allowing aliases for cleaner imports and faster build times.
- Styling relies primarily on React Bootstrap.
- Pages are routed using React Router.
- HTTP calls to the server's REST API are made using the Axios library.
- Webtokens are stored in localStorage for user authentication.
- Written in Python using the Flask framework.
- Webtokens are generated using the PyJWT library.
- Current and historical stock data is retrieved using the Finnhub API.
- REST API is built using Flask-RESTX.
- Database queries are handled using the SQLAlchemy ORM.
- The app is served using Gunicorn and hosted on AWS Elastic Beanstalk.
- Data is stored in a PostgreSQL database hosted on elephantsql.com.
- Clone this repository to your local machine.
- Sign up for free API keys from Finnhub and Financial Modeling Prep.
- Run the setup script by typing 'sh setup.sh' in your terminal. This will automatically install the necessary dependencies, create the PostgreSQL database, and start the server.
- Navigate to
localhost:5000in your browser to view the app.
Aaron Brinckerhoff - Full Stack Software Developer | LinkedIn | Website