This is the backend API for the Flutter assessment. It provides mock data endpoints for market data, analytics, and portfolio management.
- Install dependencies:
npm install- Start the server:
npm startFor development with auto-reload:
npm run devThe server will run on http://localhost:3000
GET /api/market-data- Get all market symbolsGET /api/market-data/:symbol- Get data for a specific symbol (e.g., BTC/USD)GET /api/market-data/:symbol/history?timeframe=1h&limit=100- Get historical data
GET /api/analytics/overview- Get analytics overviewGET /api/analytics/trends?timeframe=24h- Get market trendsGET /api/analytics/sentiment- Get market sentiment
GET /api/portfolio- Get portfolio summaryGET /api/portfolio/holdings- Get portfolio holdingsGET /api/portfolio/performance?timeframe=7d- Get performance metricsPOST /api/portfolio/transactions- Add a transaction
ws://localhost:3000- Real-time market updates
GET /health- Server health status