StockApp is a React Native mobile application designed to fetch stock data from the Polygon API and display a list of stocks with their prices, updating at specified intervals.
- frontend: React Native app has been used
- backend: Node.Js has been used
- Node.js installed
- React Native development environment set up
-
Clone the repository:
git clone https://github.com/Vikesh8107/StockApp.git cd StockApp
-
Install dependencies.
npm install
-
Run the Metro server.
npm start
-
Start the application on Android or iOS.
# For Android npm run android # For iOS npm run ios
This will install the required Node.js packages and set up the project for you.
- Fetch and display stock data from the Polygon API.
- Customizable refresh intervals for real-time stock updates.
-
User Input:
- Takes an integer "n" from the user as input.
-
Fetching Stocks:
- Fetches "n" stocks from the Polygon API.
- Adds a unique key called "refreshInterval" for each stock, with intervals ranging between 1-5 seconds.
-
Previous Close Prices:
- Fetches and stores the previous close prices of the stocks.
- Stores the prices in a single file for reference.
-
Real-time Updates:
- Updates stock prices at specified refresh intervals.
- Prices are updated with random values.
- Updates are made from the same file where the prices are stored.
-
UI Display:
- Displays a list of stocks with their current prices.
- Supports real-time updates for each stock.
Take an integer "n" from the user as input.
Fetch n stocks from the Polygon API and add a unique key called "refreshInterval" for each, ranging between 1-5 seconds.
Fetch previous close prices for the stocks and store them in a file.
Update stock prices at specified refresh intervals with random values. These updates are made from the same file where the prices are stored.
Check out some snapshots and a video of our app:
Special thanks to the Polygon API for providing real-time stock data.
This project is licensed under the MIT License.