ERC-20

ERC-20 endpoints

ERC-20 JSON-RPC methods share the same endpoint, by protocol definition, the payload methodparameter is the one used to know which method is the one to be called. To call this methods, is mandatory to specify the currency in which ERC-20 exists, eth in this case, the network in which to executed the request and the standard name, in this case erc20. Bitcoin JSON-RPC methods are exposed in the following endpoint http://server/eth/{network}/erc20/rpc where network has to be replace by the network name in which make the request

Return the balance of the given addresses of the given ERC-20 Contracts

post

Return the balance of the given addresses of the given ERC-20 Contracts

Body
idinteger · int32Required

Request ID

Example: 160907
jsonrpcstringRequired

JSON-RPC Version

Example: 2.0
methodstringRequired

Method name to be called. For this operation, the field value must be getAddressesBalance

Example: getAddressesBalance
Responses
200
Successful response
application/json
post
POST /erc20/getAddressesBalance HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 197

{
  "id": 160907,
  "jsonrpc": "2.0",
  "method": "getAddressesBalance",
  "params": {
    "addresses": [
      "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
    ],
    "contractAddresses": [
      "0xdAC17F958D2ee523a2206206994597C13D831ec7"
    ]
  }
}
200

Successful response

{
  "id": 160907,
  "jsonrpc": "2.0",
  "result": {
    "ANY_ADDITIONAL_PROPERTY": [
      {
        "address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
        "balance": {
          "confirmed": "10000",
          "unconfirmed": "0"
        }
      }
    ]
  }
}

Last updated