Query investment API sources for current pricing data, and save to a personal repository.
- Go
- Docker Compose
- Terraform 0.14+
- Mage (or instead of running
mage
in the scripts below, usego run mage.go
)
Required configs can be set via environment variables or in a source/.secrets.yaml
file:
- CoinMarketCapApiKey - your API key from coinmarketcap.com
cd source
mage
Open new browser window with HTML test coverage:
mage -v test 1
Without opening browser:
mage -v test 0
Cache lambda will run every minute for testing.
mage awsLocal
After it has run, retrieve the cache file from local S3 (must have the AWS CLI installed):
aws --endpoint-url=http://localhost:4566 s3api get-object --bucket invest-source.coinmarketcap-pull-cache --key 2021-01-18.json output.json
Spin down:
mage awslocalclear