Introduction: Design and implement an application that provides information about cryptocurrency. The goal is to create a functional backend system that retrieves and updates cryptocurrency data.
- AirTable: https://airtable.com/developers/web/api/introduction
- CoinGecko API: https://www.coingecko.com/en/api. An API that provides cryptocurrency-related data, including coin details and prices.
- Cache: An in-memory data structure used to store and retrieve frequently accessed data.
- Rate Limiting: Ensuring that requests to CoinGecko API are within the allowed rate limits to prevent excessive usage.
- Background Jobs:
- Coin Details Update: i. Every 10 minutes, retrieve the list of top 20 coins from the /coins/list endpoint of the CoinGecko API. ii. Update the coin details for these top 20 coins in the AirTable database.
- Current Coin Price Update: i. Every 1 minute, retrieve the current coin prices using the /simple/price endpoint of the CoinGecko API. ii. Update the current coin prices for each coin ID in both the cache and the AirTable database.
- Exposed APIs:
- GET /coins: i. This API endpoint should retrieve coins and their information from the AirTable database. ii. The response should include details like coin name, symbol, market cap, and more.
- GET /coins/price/:coinId:i.
- This API endpoint should accept a parameter coinId representing the ID of the coin.
- Retrieve the current price of the specified coin using the cache.
- If the price is not available in the cache, fetch it from the AirTable.
- Set up an AirTable account and create a table to store cryptocurrency information, including coin details and prices.
- Understand the CoinGecko API documentation to make requests to the specified endpoints.
- Implement a simple rate limiting mechanism to ensure that requests to the CoinGecko API are within the allowed limits.
- Create a cache data structure in your backend application to store frequently accessed data, such as current coin prices.
- Implement the background jobs to periodically update coin details and current prices according to the specified intervals.
- Test your application thoroughly to ensure that the background jobs, cache updates, and API endpoints are working as expected.
- Provide clear documentation on how to set up and run your application, including any necessary environment variables, dependencies, and instructions.
- Remember to keep your code clean, well-structured, and properly commented.
-
Create a .zip file of all application related files and send an email.
-
Ensure that a README file is present in the base folder describing steps for any local steps required.
-
Create a demo video and add the link to the video in GitHub readme.