EquityInsights is a Node.js project offering real-time stock data retrieval, storage in MongoDB, and RESTful API endpoints for stock analysis and management, with in-memory caching for optimized performance.
- Real-time stock data retrieval from the BSE website
- Storage of stock data in MongoDB
- Creation of a RESTful API using Express.js
- Support for top 10 stocks retrieval, search by name, price history, favorites management (add, view, remove)
- Refresh functionality to update data.
- In-memory caching of stock data for optimized performance
For running this project locally, you need to set up and define the environment variables.
- Create .env in the root directory with the following variables and add the connection string from MongoDB:
- MONGO_URI=
- Clone the repo
- cd EquityInsights/
- npm install
- npm start
-
"localhost:3000/top10stocks" - GET
-
"localhost:3000/stocksByName" - GET
Sample Request Body:
{ "name": "ABB" }
-
"localhost:3000/stockPriceHistory" - GET
Sample Request Body:
{ "code": "500003" }
-
"localhost:3000/addfavourites" - POST
Sample Request Body:
{ "code": "500003" }
-
"localhost:3000/getfavourites" - GET
-
"localhost:3000/deletefavourites" - POST
Sample Request Body:
{ "code": "500003" }





