An Angular web application for virtual stock trading made as an update for Hedge Traders ICT.
This Angular app provides a platform for stocks trading, including, features such as searching company stock details, buying/selling stocks, keeping track of stock porfolio/watchlist, viewing stock price charts and news, allowing sharing news on twitter and facebook for a given stock. Express with Nodejs is used as a server proxy for all API calls that uses Tingo API for all stock related data, and News API for displaying stock related news. Highcharts is used for displaying the chart data for a given ticker.
Before running make sure Angular CLI and Nodejs are installed. For this project Angular CLI 10.1.6
and Node 12.19.0
was used.
- clone the repo using
git clone https://github.com/rehmanis/CSCI571-Stocks-Angular.git
cd CSCI571-Stocks-Angular
npm install
ng build
npm run devstart
- open
Chrome
orFirefox
. The App can then be started onhttp://localhost:3000/
The following are the 6 API endpoints to get Stock data and News.
-
/api/detail/<ticker>
: get JSON object with company details/summary- Example for GCP endpoints: https://csci571-trading-platform.wl.r.appspot.com/api/detail/aapl
- Example for when running locally: http://localhost:3000/api/detail/msft
-
/api/price/<ticker1>,<ticker2>,...
: get JSON object with all companies prices points, volumes, etc.- Example for GCP endpoints: https://csci571-trading-platform.wl.r.appspot.com/api/price/aapl,msft
- Example for when running locally: http://localhost:3000/api/price/msft,amd,tsla
-
/api/chart/daily/<ticker>/<startDate:YYYY-MM-DD>
: get the JSON object that contains the timestamp, close price, high price, low price, and open price. This was used to display daily chart data.- Example for GCP endpoint: https://csci571-trading-platform.wl.r.appspot.com/api/chart/daily/aapl/2020-12-16
- Example for when running locally: http://localhost:3000/api/chart/daily/aapl/2020-12-02
-
/api/chart/historical/<ticker>
: get the JSON object that contains historical price data from last two years from now. This is used to plot the SMA chart- Example for GCP endpoint: https://csci571-trading-platform.wl.r.appspot.com/api/chart/historical/work
- Example for when running locally: http://localhost:3000/api/chart/historical/tsla
-
/api/news/<search query>
: get the JSON object that contains all news articles related to the searched query. The search query for this project is the ticker for the company. The articles are restricted to 20.- Example for GCP endpoint: https://csci571-trading-platform.wl.r.appspot.com/api/news/amd
- Example for when running locally: http://localhost:3000/api/news/amd
-
/api/search/<search query>
: get the JSON object for all search query. This is used for auto complete feature when searching for the ticker.- Example for GCP endpoint: https://csci571-trading-platform.wl.r.appspot.com/api/search/apple
- Example for when running locally: http://localhost:3000/api/search/warner