MarketTracker is a cutting-edge platform that delivers real-time price data for stocks and cryptocurrencies. With a sleek interface and powerful features, it offers up-to-date market information and stores 1-second interval data in MongoDB for detailed historical tracking.
- Features
- Tech Stack
- Setup MongoDB and Redis
- Setup and Installation
- Usage
- Scripts
- Contributing
- License
- Real-time price updates from Binance
- Historical data fetching (1-second intervals)
- Interactive TradingView chart
- Symbol management with search, pagination, sorting
- WebSocket for live updates
- Efficient Redis caching
- 1-second data storage in MongoDB
- Backend: Node.js, Express, MongoDB, Redis, BullMQ
- Frontend: Next.js, React, Redux, Material-UI, Lightweight-Charts
- WebSockets: Binance WebSocket API
- Logging: Winston
- Task Queue: BullMQ
- MongoDB: Follow the installation guide for your OS.
- Redis: Follow the installation guide for your OS.
- Node.js (>=14.x)
- MongoDB
- Redis
- npm or yarn
-
Clone the repository:
git clone https://github.com/anjalilaishram/MarketTracker.git cd MarketTracker/backend
-
Install dependencies:
npm install
-
Create a
.env
file in thebackend
directory:BINANCE_API_BASE_URL=https://api.binance.com BINANCE_WS_URL=wss://stream.binance.com:9443/ws MONGODB_URI=mongodb://localhost:27017/market_tracker REDIS_HOST=localhost REDIS_PORT=6379 PORT=5000
-
Run database migrations:
npm run migrate
-
Start the backend server:
npm run server
-
Navigate to the
frontend
directory:cd ../frontend
-
Install dependencies:
npm install
-
Create a
.env.local
file in thefrontend
directory:NEXT_PUBLIC_API_URL=http://localhost:5000/api
-
Start the frontend development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000
. - Use the symbol manager to track or untrack symbols.
- View real-time and historical data on the TradingView chart.
npm run server
: Start the backend servernpm run migrate
: Run database migrations
npm run dev
: Start the frontend development servernpm run build
: Build the frontend for productionnpm start
: Start the production server
Contributions are welcome! Please read the contributing guidelines for more details.
This project is licensed under the MIT License. See the LICENSE file for details.