CryptoCompare¶
Overview¶
Adapter for use on Google Cloud Platform or AWS Lambda. Upload Zip and use trigger URL as bridge endpoint.
Installation¶
Build¶
npm install
zip -r cl-cc.zip .
Tip
You can use one of our precompiled ZIP files from Releases. Most recent release: cl-cc-aws-gcp.zip
Upload¶
Create a cloud function in GCP or Lambda, upload the ZIP file and set the handler function according to the platform you are using.
- GCP:
gcpservice
- AWS:
handler
Test Cases (GCP/AWS test events)¶
Fail¶
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {}
}
{
"jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"Response": "Error",
"Message": "",
"Type": 1,
"Aggregated": false,
"Data": [],
"Path": "/data/",
"ErrorsSummary": "Not implemented"
}
}
Pass¶
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "price",
"fsym": "ETH",
"tsyms": "USD"
}
}
{
"jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"USD": 285.58
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "price",
"fsym": "ETH",
"tsyms": "USD,EUR,JPY"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "pricemulti",
"fsyms": "BTC,ETH",
"tsyms": "USD,EUR"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "pricemultifull",
"fsyms": "BTC,ETH",
"tsyms": "USD,EUR"
}
}
{
"id": "278c97ffadb54a5bbb93cfec5f7b5503",
"data": {
"endpoint": "generateAvg",
"fsym": "ETH",
"tsym": "USD",
"exchange": "Kraken"
}
}