Chainlink Node Setup

  1. Home
  2. Docs
  3. Chainlink Node Setup
  4. Chainlink Adapters
  5. Private: Linkpool Bridges
  6. API Aggregator (LinkPool Bridges)

API Aggregator (LinkPool Bridges)

Bridges implementation that can generically aggregate numerical values for any given amount of APIs.

Bridges is a linkpool script for running popular external adapters. You can review their github here

Supported Aggregation Methods:

  • Mode
  • Median
  • Mean

Setup Instructions

Local Install

Make sure Golang is installed.

Build (in the root of the bridges repository):

GO111MODULE=on go build examples/apiaggregator/main -o apiaggregator

Then run the bridge:



To run the container:

docker run -it -p 8080:8080 linkpool/apiaggregator-bridge:latest

AWS Lambda

zip ./apiaggregator

Upload the the zip file into AWS and then use apiaggregator as the handler.

Important: Set the LAMBDA environment variable to true in AWS for the adaptor to be compatible with Lambda.

Solidity Usage



To call the API, you need to send a POST request to http://localhost:<port>/ with the request body being of the ChainLink RunResult type.

For example:

curl -X POST http://localhost:8080/ \
-H 'Content-Type: application/json' \
-d @- << EOF
	"jobId": "1234",
	"data": {
		"api": ["", ""],
		"paths": ["$.last", "$.price"],
		"aggregationType": "median"

Should return something similar to:

    "jobRunId": "1234",
    "status": "completed",
    "error": null,
    "pending": false,
    "data": {
        "EUR": 141.65,
        "JPY": 17864.71,
        "USD": 160.11,
        "aggregationType": "median",
        "api": [
        "paths": [
Was this article helpful to you? Yes No

How can we help?