A server-side application developed using Node.js and MongoDB to track cryptocurrency data, including price, market cap, and 24-hour change, and compute statistical information like standard deviation.
-
Background Job:
- Fetches current price, market cap, and 24-hour change for Bitcoin, Matic, and Ethereum.
- Runs automatically every 2 hours using a cron job.
-
REST APIs:
/stats: Fetches the latest data for a specific cryptocurrency./deviation: Calculates the standard deviation of the cryptocurrency's price from the last 100 records.
- Description: Fetches the latest data for a specified cryptocurrency.
- Method: GET
- Query Parameters:
coin: Can be one ofbitcoin,matic-network, orethereum.
- Sample Request:
GET /stats?coin=bitcoin - Sample Response:
{ "price": 40000, "marketCap": 800000000, "24hChange": 3.4 }
- Description: Calculates the standard deviation of the cryptocurrency's price for the last 100 records.
- Method: GET
- Query Parameters:
coin: Can be one ofbitcoin,matic-network, orethereum.
- Sample Request:
GET /deviation?coin=bitcoin - Sample Response:
{ "deviation": 4082.48 }
- Add user authentication to restrict access to APIs.
- Implement a caching layer for frequent API requests.
- Extend support to additional cryptocurrencies.
- Add real-time notifications for significant price changes.
- CoinGecko API for cryptocurrency data.
- Node.js and MongoDB for backend development.
For any queries or suggestions, feel free to contact:
- Name: Akash Kumar Prasad
- Email: [email protected]