Skip to content

Latest commit

 

History

History
149 lines (121 loc) · 5.23 KB

File metadata and controls

149 lines (121 loc) · 5.23 KB

Chainlink External Adapters to query address balance from SoChain

1.3.32 v2

Base URL https://sochain.com

This document was generated automatically. Please see README Generator for more info.

Known Issues

MAX_PAYLOAD_SIZE_LIMIT configuration

The MAX_PAYLOAD_SIZE_LIMIT environment variable is used for controlling the maximum size of the incoming request body that the EA can handle. If you decide to customize this value it's essential to ensure that any reverse proxy or web server in front of the EA, such as Nginx, is also configured with a corresponding limit. This alignment prevents scenarios where Nginx rejects a request for exceeding its payload size limit before it reaches the EA.

Environment Variables

Required? Name Description Type Options Default
API_ENDPOINT string https://sochain.com

Data Provider Rate Limits

Name Requests/credits per second Requests/credits per minute Requests/credits per hour Note
free 300

Input Parameters

Every EA supports base input parameters from this list

Required? Name Description Type Options Default
endpoint The endpoint to use string balance balance

Balance Endpoint

balance is the only supported name for this endpoint.

Input Params

Required? Name Aliases Description Type Options Default Depends On Not Valid With
addresses Array of objects with address information as defined below array
confirmations Confirmations parameter number 6
dataPath Path where to find the addresses array string result

Address objects within addresses have the following properties:

Required? Name Description Type Options Default
address Address to query string
chain Chain to query (Ethereum testnet is Rinkeby) string mainnet, testnet mainnet
coin Currency to query string Ex. bch, btc, btsv, eth, ltc, zec btc

Example

Request:

{
  "id": "1",
  "data": {
    "dataPath": "addresses",
    "confirmations": 3,
    "addresses": [
      {
        "address": "3D8DJLwUXFfZvE8yJRu729MZ8uLy25SuLz",
        "coin": "btc"
      },
      {
        "address": "38bzm6nhQMFJe71jJw1U7CbgNrVNpkonZF",
        "coin": "btc"
      }
    ],
    "endpoint": "balance"
  },
  "debug": {
    "cacheKey": "AExDilGMUjYLkzTZ2d0iA6PbB40="
  },
  "rateLimitMaxAge": 222
}

Response:

{
  "jobRunID": "1",
  "statusCode": 200,
  "data": {
    "responses": [
      {
        "status": "success",
        "data": {
          "network": "BTC",
          "address": "3D8DJLwUXFfZvE8yJRu729MZ8uLy25SuLz",
          "confirmed_balance": "0.00000000",
          "unconfirmed_balance": null
        }
      },
      {
        "status": "success",
        "data": {
          "network": "BTC",
          "address": "38bzm6nhQMFJe71jJw1U7CbgNrVNpkonZF",
          "confirmed_balance": "0.00002188",
          "unconfirmed_balance": null
        }
      }
    ],
    "result": [
      {
        "address": "3D8DJLwUXFfZvE8yJRu729MZ8uLy25SuLz",
        "coin": "BTC",
        "chain": "mainnet",
        "balance": "0"
      },
      {
        "address": "38bzm6nhQMFJe71jJw1U7CbgNrVNpkonZF",
        "coin": "BTC",
        "chain": "mainnet",
        "balance": "2188"
      }
    ]
  },
  "result": [
    {
      "address": "3D8DJLwUXFfZvE8yJRu729MZ8uLy25SuLz",
      "coin": "BTC",
      "chain": "mainnet",
      "balance": "0"
    },
    {
      "address": "38bzm6nhQMFJe71jJw1U7CbgNrVNpkonZF",
      "coin": "BTC",
      "chain": "mainnet",
      "balance": "2188"
    }
  ]
}

MIT License