Skip to content
Chainlink CryptoCompare External Adapter for GCP and AWS
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead, 3 commits behind thodges-gh:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Chainlink CryptoCompare External Adapter

Adapter for use on Google Cloud Platform or AWS Lambda. Upload Zip and use trigger URL as bridge endpoint.

Install

Build yourself

npm install

Create zip:

zip -r cl-cc.zip .

Use precompiled release

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

Event:

{
  "id": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {}
}

Result:

{
  "jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "Response": "Error",
    "Message": "",
    "Type": 1,
    "Aggregated": false,
    "Data": [],
    "Path": "/data/",
    "ErrorsSummary": "Not implemented"
  }
}

Pass

Event:

{
  "id": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "endpoint": "price",
    "fsym": "ETH",
    "tsyms": "USD"
  }
}

Result:

{
  "jobRunID": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "USD": 285.58
  }
}

Event:

{
  "id": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "endpoint": "price",
    "fsym": "ETH",
    "tsyms": "USD,EUR,JPY"
  }
}

Event:

{
  "id": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "endpoint": "pricemulti",
    "fsyms": "BTC,ETH",
    "tsyms": "USD,EUR"
  }
}

Event:

{
  "id": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "endpoint": "pricemultifull",
    "fsyms": "BTC,ETH",
    "tsyms": "USD,EUR"
  }
}

Event:

{
  "id": "278c97ffadb54a5bbb93cfec5f7b5503",
  "data": {
    "endpoint": "generateAvg",
    "fsym": "ETH",
    "tsym": "USD",
    "exchange": "Kraken"
  }
}
You can’t perform that action at this time.