This AWS Lambda Python script runs every hour and updates the prices of cryptocurrencies. It also calculates the total value of your crypto and fiat savings.
- Updates the prices of specified cryptocurrencies every hour.
- Calculates the total value of your crypto and fiat savings.
- Saves the data to a database or file for future reference.
- AWS Lambda account
- Python 3.x
- Required Python packages (specified in requirements.txt)
- (Optional)
python -m unittestfor tests
- Clone or download the repository to your local machine.
- Create an AWS Lambda function and upload the code.
- Set up the required environment variables (e.g. API keys, database connection details).
- Configure a CloudWatch event to trigger the Lambda function every hour.
- The Lambda validates required environment variables at startup and logs a clear error if one is missing.
- Notion database queries are paginated, so totals and updates include all rows.
- HTTP calls use timeouts and retries for transient errors.
Run the unit tests locally:
pytest