NAV
shell graphql

Introduction

Analytics is an application built upon IoTeX core API which extracts data from IoTeX blockchain and reindexes them for applications to use via a GraphQL web interface. You can use the playground here.

Common Attributes

Pagination

Field Type Label Description
skip uint64 starting index of results
first uint64 number of records per page

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Chain Service API

Chain

gives the latest epoch number / block height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.Chain \
  --header 'Content-Type: application/json' \
  --data '{}'
query{
  Chain{
    mostRecentEpoch
    mostRecentBlockHeight
    totalSupply
    totalCirculatingSupply
    exactCirculatingSupply
    totalCirculatingSupplyNoRewardPool
    votingResultMeta{
      totalCandidates
      totalWeightedVotes
      votedTokens
    }
    rewards{
      totalBalance
      totalAvailable
      totalUnclaimed
    }
  }
}

Example response:

{
  "data": {
    "Chain": {
      "exactCirculatingSupply": "9252829326969999922855499899",
      "mostRecentBlockHeight": 18980166,
      "mostRecentEpoch": 28884,
      "rewards": {
        "totalAvailable": "440833151247362249902675121",
        "totalBalance": "498742289434892391257888603",
        "totalUnclaimed": "57909138187530141355213482"
      },
      "totalCirculatingSupply": "9457829322133866787170249906",
      "totalCirculatingSupplyNoRewardPool": "9016996170886504537267574785",
      "totalSupply": "9457829326969999922855499899",
      "votingResultMeta": {
        "totalCandidates": 75,
        "totalWeightedVotes": "3079386720450377171762829252",
        "votedTokens": "3743652944403254009755212860"
      }
    }
  }
}

HTTP Request

POST /api.ChainService.Chain

ChainRequest

ChainResponse

Field Type Label Description
mostRecentEpoch uint64 most recent epoch
mostRecentBlockHeight uint64 most recent block height
totalSupply string total supply
totalCirculatingSupply string total circulating supply
totalCirculatingSupplyNoRewardPool string total circulating supply no reward pool
votingResultMeta VotingResultMeta voting result meta
exactCirculatingSupply string exact circulating supply
rewards ChainResponse.Rewards rewards

ChainResponse.Rewards

Field Type Label Description
totalBalance string total balance
totalUnclaimed string total unclaimed
totalAvailable string total available

VotingResultMeta

Field Type Label Description
totalCandidates uint64 total candidates
totalWeightedVotes string total weighted votes
votedTokens string voted tokens

MostRecentTPS

gives the latest transactions per second

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.MostRecentTPS \
  --header 'Content-Type: application/json' \
  --data '{
    "blockWindow": 5
}'
query {
    MostRecentTPS(blockWindow: 5) {
        mostRecentTPS
    }
}


Example response:

{
    "data": {
        "MostRecentTPS": {
            "mostRecentTPS": 0.8421052631578947
        }
    }
}

HTTP Request

POST /api.ChainService.MostRecentTPS

MostRecentTPSRequest

Field Type Label Description
blockWindow uint64 number of last blocks that are backtracked to compute TPS

MostRecentTPSResponse

Field Type Label Description
mostRecentTPS double latest transactions per second

NumberOfActions

gives the number of actions

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.NumberOfActions \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 5
}'
query {
    NumberOfActions(startEpoch: 20000, epochCount: 5) {
        exist
        count
    }
}


Example response:

{
    "data": {
        "NumberOfActions": {
            "count": 12744,
            "exist": true
        }
    }
}

HTTP Request

POST /api.ChainService.NumberOfActions

NumberOfActionsRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count

NumberOfActionsResponse

Field Type Label Description
exist bool whether the starting epoch number is less than the most recent epoch number
count uint64 number of actions

TotalTransferredTokens

TotalTransferredTokens gives the amount of tokens transferred within a time frame

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.TotalTransferredTokens \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
  "epochCount": 2
}'
query {
  TotalTransferredTokens(startEpoch: 20000, epochCount: 2) {
    totalTransferredTokens
  }
}

Example response:

{
  "data": {
    "TotalTransferredTokens": {
      "totalTransferredTokens": "2689365862730085490074594"
    }
  }
}

HTTP Request

POST /api.ChainService.TotalTransferredTokens

TotalTransferredTokensRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count

TotalTransferredTokensResponse

Field Type Label Description
totalTransferredTokens string total tranferred tokens

BlockSizeByHeightRequest

BlockSizeByHeightRequest gives the block size and server version by block height

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.BlockSizeByHeight \
  --header 'Content-Type: application/json' \
  --data '{
    "height": 3233333
}'
query{
  BlockSizeByHeight(height:3233333){
    serverVersion
    blockSize
  }
}

Example response:

{
  "data": {
    "BlockSizeByHeight": {
      "blockSize": 1707.578,
      "serverVersion": "0.10.0"
    }
  }
}

HTTP Request

POST /api.ChainService.BlockSizeByHeight

BlockSizeByHeightRequest

Field Type Label Description
height uint64 block height

BlockSizeByHeightResponse

Field Type Label Description
blockSize double size
serverVersion string version

Delegate Service API

BucketInfo

BucketInfo provides voting bucket detail information for candidates within a range of epochs

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.BucketInfo \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 24738,
    "epochCount": 2,
    "delegateName": "metanyx",
    "pagination": {
        "skip": 0,
        "first": 5
    }
}'
query {
    BucketInfo(
        startEpoch: 24738
        epochCount: 2
        delegateName: "metanyx"
        pagination: { skip: 0, first: 5 }
    ) {
        bucketInfoList {
            epochNumber
            count
            bucketInfo {
                bucketID
                voterIotexAddress
                votes
                weightedVotes
                remainingDuration
                isNative
                startTime

            }
        }
    }
}

Example response:

{
    "exist": true,
    "count": "2",
    "bucketInfoList": [
        {
            "epochNumber": "24738",
            "count": "7136",
            "bucketInfo": [
                {
                    "voterEthAddress": "0x2e0491b4925ebc82af97def12b72ead940613293",
                    "voterIotexAddress": "io19czfrdyjt67g9tuhmmcjkuh2m9qxzv5nqyve9p",
                    "isNative": true,
                    "votes": "1283019032866474771223667",
                    "weightedVotes": "1848668139159798560008586",
                    "remainingDuration": "8400h0m0s",
                    "startTime": "2020-06-01 18:14:45 +0000 UTC",
                    "decay": false,
                    "bucketID": "39"
                },
                ...
            ]
        },
        ...
    ]
}

HTTP Request

POST /api.DelegateService.BucketInfo

BucketInfoRequest

Field Type Label Description
startEpoch uint64 Epoch number to start from
epochCount uint64 Number of epochs to query
delegateName string Name of the delegate
pagination pagination.Pagination Pagination info

BucketInfoResponse

Field Type Label Description
exist bool whether the delegate has voting bucket information within the specified epoch range
count uint64 total number of buckets in the given epoch for the given delegate
bucketInfoList BucketInfoList repeated

BucketInfo

Field Type Label Description
voterEthAddress string voter’s ERC20 address
voterIotexAddress string voter's IoTeX address
isNative bool whether the bucket is native
votes string voter's votes
weightedVotes string voter’s weighted votes
remainingDuration string bucket remaining duration
startTime string bucket start time
decay bool whether the vote weight decays
bucketID uint64 bucket id

BucketInfoList

Field Type Label Description
epochNumber uint64 epoch number
count uint64 total number of buckets in the given epoch for the given delegate
bucketInfo BucketInfo repeated

BookKeeping

BookKeeping gives delegates an overview of the reward distributions to their voters within a range of epochs

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.BookKeeping \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 23328,
    "epochCount": 10,
    "delegateName": "iotexlab",
    "pagination": {
        "skip": 0,
        "first": 2
    },
    "percentage": 90,
    "includeBlockReward":true,
    "includeFoundationBonus":false
}'
query {
  BookKeeping(
    startEpoch: 23328
    epochCount: 10
    delegateName: "iotexlab"
    percentage: 90
    includeFoundationBonus: false
    includeBlockReward: false
    pagination: { skip: 0, first: 2 }
  ) {
    count
    rewardDistribution {
      voterEthAddress
      amount
    }
  }
}

Example response:

{
    "exist": true,
    "count": "5567",
    "rewardDistribution": [
        {
            "voterEthAddress": "0x0002d2d9945709b50cfbac675d7e6bdac34575f4",
            "voterIotexAddress": "io1qqpd9kv52uym2r8m43n46lntmtp52a05d7s8gj",
            "amount": "77071218081884295"
        },
        ...
    ]
}

HTTP Request

POST /api.DelegateService.BookKeeping

BookKeepingRequest

Field Type Label Description
startEpoch uint64 epoch number to start from
epochCount uint64 number of epochs to query
delegateName string name of the delegate
pagination pagination.Pagination Pagination info
percentage uint64 percentage of the reward to be paid to the delegate
includeBlockReward bool whether to include block reward
includeFoundationBonus bool whether to include foundation bonus

BookKeepingResponse

Field Type Label Description
exist bool whether the delegate has bookkeeping information within the specified epoch range
count uint64 total number of reward distributions
rewardDistribution DelegateRewardDistribution repeated

DelegateRewardDistribution

Field Type Label Description
voterEthAddress string voter’s ERC20 address
voterIotexAddress string voter’s IoTeX address
amount string amount of reward distribution

Productivity

Productivity gives block productivity of producers within a range of epochs

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.Productivity \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 25020,
    "epochCount": 10,
    "delegateName": "iotexlab"
}'
query {
  Productivity(
    startEpoch: 25020
    epochCount: 10
    delegateName: "iotexlab"
  ) {
    productivity {
      exist
      production
      expectedProduction
    }
  }
}


Example response:

{
    "productivity": {
        "exist": true,
        "production": "180",
        "expectedProduction": "180"
    }
}

HTTP Request

POST /api.DelegateService.Productivity

ProductivityRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count
delegateName string producer name

ProductivityResponse

Field Type Label Description
productivity Productivity

Productivity

Field Type Label Description
exist bool whether the delegate has productivity information within the specified epoch range
production uint64 number of block productions
expectedProduction uint64 number of expected block productions

Reward

Reward provides reward detail information for candidates within a range of epochs

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.Reward \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 23000,
    "epochCount": 1,
    "delegateName": "iotexlab"
}'
query {
  Reward(startEpoch: 23000, epochCount: 1, delegateName: "iotexlab") {
    reward {
      exist
      blockReward
      foundationBonus
      epochReward
    }
  }
}

Example response:

{
    "reward": {
        "blockReward": "240000000000000000000",
        "epochReward": "984040630606589747896",
        "foundationBonus": "80000000000000000000",
        "exist": true
    }
}

HTTP Request

POST /api.DelegateService.Reward

RewardRequest

Field Type Label Description
startEpoch uint64 Epoch number to start from
epochCount uint64 Number of epochs to query
delegateName string Name of the delegate

RewardResponse

Field Type Label Description
reward Reward

Reward

Field Type Label Description
blockReward string amount of block rewards
epochReward string amount of epoch rewards
foundationBonus string amount of foundation bonus
exist bool whether the delegate has reward information within the specified epoch range

Staking

Staking provides staking information for candidates within a range of epochs

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.Staking \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 2,
    "delegateName": "metanyx"
}'
query {
  Staking(startEpoch: 20000, epochCount: 2, delegateName: "metanyx") {
    exist
    stakingInfo {
      epochNumber
      totalStaking
      selfStaking
    }
  }
}

Example response:

{
  "data": {
    "Staking": {
      "exist": true,
      "stakingInfo": [
        {
          "epochNumber": 20000,
          "selfStaking": "1266890287625445522068595",
          "totalStaking": "219516310335741609989431119"
        },
        {
          "epochNumber": 20001,
          "selfStaking": "1266890287625445522068595",
          "totalStaking": "219518846815421318945180493"
        }
      ]
    }
  }
}

HTTP Request

POST /api.DelegateService.Staking

StakingRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count
delegateName string candidate name

StakingResponse

Field Type Label Description
exist bool whether the delegate has staking information within the specified epoch range
stakingInfo StakingResponse.StakingInfo repeated

StakingResponse.StakingInfo

Field Type Label Description
epochNumber uint64 epoch number
totalStaking string total staking amount
selfStaking string candidate’s self-staking amount

ProbationHistoricalRate

ProbationHistoricalRate provides the rate of probation for a given delegate

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.ProbationHistoricalRate \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 27650,
    "epochCount": 5,
    "delegateName": "chainshield"
}'
query {
  ProbationHistoricalRate(
    startEpoch: 27650
    epochCount: 5
    delegateName: "chainshield"
  ) {
    probationHistoricalRate
  }
}

Example response:

{
  "data": {
    "ProbationHistoricalRate": {
      "probationHistoricalRate": "0.80"
    }
  }
}

HTTP Request

POST /api.DelegateService.ProbationHistoricalRate

ProbationHistoricalRateRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count
delegateName string candidate name

ProbationHistoricalRateResponse

Field Type Label Description
probationHistoricalRate string probation historical rate

Account Service API

IotexBalanceByHeight

IotexBalanceByHeight returns the balance of the given address at the given height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.IotexBalanceByHeight \
  --header 'Content-Type: application/json' \
  --data '{
    "address": ["io1qnpz47hx5q6r3w876axtrn6yz95d70cjl35r53"], 
    "height":8927781 
}'
query {
  IotexBalanceByHeight(
    address: ["io1qnpz47hx5q6r3w876axtrn6yz95d70cjl35r53"]
    height: 8927781
  ) {
    balance
    height
  }
}


Example response:

{
  "data": {
    "IotexBalanceByHeight": {
      "balance": [
        "957.111886573698936216"
      ],
      "height": 8927781
    }
  }
}

HTTP Request

POST /api.AccountService.IotexBalanceByHeight

IotexBalanceByHeightRequest

Field Type Label Description
address string repeated address lists
height uint64 block height

IotexBalanceByHeightResponse

Field Type Label Description
height uint64 block height
balance string repeated balance at the given height.

ActiveAccounts

ActiveAccounts lists most recently active accounts

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.ActiveAccounts \
  --header 'Content-Type: application/json' \
  --data '{
    "count": 5
}'
query {
  ActiveAccounts(count:5){
    activeAccounts
  }
}



Example response:

{
  "data": {
    "ActiveAccounts": {
      "activeAccounts": [
        "io1aqf30kqz5rqh6zn82c00j684p2h2t5cg30wm8t",
        "io1lhukp867ume3qn2g7cxn4e47pj0ugfxeqj7nm8",
        "io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85",
        "io12p2td5p5tmaqqztdejl0dqdqalmajylw57x3e8",
        "io17cmrextyfeu4gddwd89g5qncedsnc553dhz7xa"
      ]
    }
  }
}

HTTP Request

POST /api.AccountService.ActiveAccounts

ActiveAccountsRequest

Field Type Label Description
count uint64 number of account addresses to be queried for active accounts

ActiveAccountsResponse

Field Type Label Description
activeAccounts string repeated list of account addresses

OperatorAddress

OperatorAddress finds the delegate's operator address given the delegate's alias name

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.OperatorAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "aliasName": "metanyxa"
}'
query {
  OperatorAddress(aliasName:"metanyx") {
    exist
    operatorAddress
  }
}

Example response:

{
  "data": {
    "OperatorAddress": {
      "exist": true,
      "operatorAddress": "io10reczcaelglh5xmkay65h9vw3e5dp82e8vw0rz"
    }
  }
}

HTTP Request

POST /api.AccountService.OperatorAddress

OperatorAddressRequest

Field Type Label Description
aliasName string delegate's alias name

OperatorAddressResponse

Field Type Label Description
exist bool whether the alias name exists
operatorAddress string operator address associated with the given alias name

Alias

Alias finds the delegate's alias name given the delegate's operator address

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.Alias \
  --header 'Content-Type: application/json' \
  --data '{
    "operatorAddress": "io10reczcaelglh5xmkay65h9vw3e5dp82e8vw0rz"
}'
query {
  Alias(operatorAddress:"io10reczcaelglh5xmkay65h9vw3e5dp82e8vw0rz") {
    exist
    aliasName
  }
}

Example response:

{
  "data": {
    "Alias": {
      "aliasName": "metanyx",
      "exist": true
    }
  }
}

HTTP Request

POST /api.AccountService.Alias

AliasRequest

Field Type Label Description
operatorAddress string delegate's operator address

AliasResponse

Field Type Label Description
exist bool whether the operator address exists
aliasName string delegate's alias name

TotalNumberOfHolders

TotalNumberOfHolders returns total number of IOTX holders so far

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.TotalNumberOfHolders \
  --header 'Content-Type: application/json' \
  --data '{
}'
query {
  TotalNumberOfHolders{
    totalNumberOfHolders
  }
}

Example response:

{
  "data": {
    "TotalNumberOfHolders": {
      "totalNumberOfHolders": 511692
    }
  }
}

HTTP Request

POST /api.AccountService.TotalNumberOfHolders

TotalNumberOfHoldersRequest

TotalNumberOfHoldersResponse

Field Type Label Description
totalNumberOfHolders uint64 total number of IOTX holders so far

TotalAccountSupply

TotalAccountSupply returns total amount of tokens held by IoTeX accounts

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.TotalAccountSupply \
  --header 'Content-Type: application/json' \
  --data '{
}'
query {
  TotalAccountSupply{
    totalAccountSupply
  }
}

Example response:

{
  "data": {
    "TotalAccountSupply": {
      "totalAccountSupply": "12496299023824745920503427462"
    }
  }
}

HTTP Request

POST /api.AccountService.TotalAccountSupply

TotalAccountSupplyRequest

TotalAccountSupplyResponse

Field Type Label Description
totalAccountSupply string total amount of tokens held by IoTeX accounts

Voting Service API

CandidateInfo

CandidateInfo provides candidate information

curl --request POST \
  --url https://analyser-api.iotex.io/api.VotingService.CandidateInfo \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 2
}'
query {
  CandidateInfo(startEpoch: 20000, epochCount: 2) {
    candidateInfo {
      epochNumber
      candidates {
        name
        address
        totalWeightedVotes
        selfStakingTokens
        operatorAddress
        rewardAddress
      }
    }
  }
}

Example response:

{
  "data": {
    "CandidateInfo": {
      "candidateInfo": [
        {
          "candidates": [
            {
              "address": "io1x3us2fktfq6tnftjzwtvgxh3ymvcfwy9fts7td",
              "name": "binancevote",
              "operatorAddress": "io1jzteq7gc5sh8tfp5auz8wwj97kvdapr9y8wzne",
              "rewardAddress": "io1x3us2fktfq6tnftjzwtvgxh3ymvcfwy9fts7td",
              "selfStakingTokens": "1230047466749539291090944",
              "totalWeightedVotes": "431578548518498595882908724"
            },
            ...
          ],
          "epochNumber": 20000
        },
        {
          "candidates": [
            {
              "address": "io1x3us2fktfq6tnftjzwtvgxh3ymvcfwy9fts7td",
              "name": "binancevote",
              "operatorAddress": "io1jzteq7gc5sh8tfp5auz8wwj97kvdapr9y8wzne",
              "rewardAddress": "io1x3us2fktfq6tnftjzwtvgxh3ymvcfwy9fts7td",
              "selfStakingTokens": "1230047466749539291090944",
              "totalWeightedVotes": "431556053359847416499574130"
            },
            ...
          ],
          "epochNumber": 20001
        }
      ]
    }
  }
}

HTTP Request

POST /api.VotingService.CandidateInfo

CandidateInfoRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count

CandidateInfoResponse

Field Type Label Description
candidateInfo CandidateInfoResponse.CandidateInfo repeated

CandidateInfoResponse.CandidateInfo

Field Type Label Description
epochNumber uint64 epoch number
candidates CandidateInfoResponse.Candidates repeated

CandidateInfoResponse.Candidates

Field Type Label Description
name string candidate name
address string canddiate address
totalWeightedVotes string total weighted votes
selfStakingTokens string candidate self-staking tokens
operatorAddress string candidate operator address
rewardAddress string candidate reward address

RewardSources

RewardSources provides reward sources for voters

curl --request POST \
  --url https://analyser-api.iotex.io/api.VotingService.RewardSources \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 2,
    "voterIotxAddress": "io1rl62pepun2g7sed2tpv4tx7ujynye34fqjv40t"
}'
query {
  RewardSources(
    startEpoch: 20000
    epochCount: 2
    voterIotxAddress: "io1rl62pepun2g7sed2tpv4tx7ujynye34fqjv40t"
  ) {
    exist
    delegateDistributions {
      delegateName
      amount
    }
  }
}

Example response:

{
  "data": {
    "RewardSources": {
      "delegateDistributions": [
        {
          "amount": "940751518955182",
          "delegateName": "a4x"
        }
      ],
      "exist": true
    }
  }
}

HTTP Request

POST /api.VotingService.RewardSources

RewardSourcesRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count
voterIotxAddress string voter IoTeX address

RewardSourcesResponse

Field Type Label Description
exist bool whether the voter has reward information within the specified epoch range
delegateDistributions RewardSourcesResponse.DelegateDistributions repeated

RewardSourcesResponse.DelegateDistributions

Field Type Label Description
delegateName string delegate name
amount string amount of reward distribution

VotingMeta

VotingMeta provides metadata of voting results

curl --request POST \
  --url https://analyser-api.iotex.io/api.VotingService.VotingMeta \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 2
}'
query {
  VotingMeta(startEpoch: 20000, epochCount: 2) {
    exist
    candidateMeta {
      epochNumber
      totalCandidates
      consensusDelegates
      totalWeightedVotes
      votedTokens
    }
  }
}

Example response:

{
  "data": {
    "VotingMeta": {
      "candidateMeta": [
        {
          "consensusDelegates": 36,
          "epochNumber": 20000,
          "totalCandidates": 58,
          "totalWeightedVotes": "3497033939381331462899534869",
          "votedTokens": "2828696111178324496444652661"
        },
        {
          "consensusDelegates": 36,
          "epochNumber": 20001,
          "totalCandidates": 58,
          "totalWeightedVotes": "3497019706023954289836152135",
          "votedTokens": "2828703742673077328930935452"
        }
      ],
      "exist": true
    }
  }
}

HTTP Request

POST /api.VotingService.VotingMeta

VotingMetaRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count

VotingMetaResponse

Field Type Label Description
exist bool whether the starting epoch number is less than the most recent epoch number
candidateMeta VotingMetaResponse.CandidateMeta repeated

VotingMetaResponse.CandidateMeta

Field Type Label Description
epochNumber uint64 epoch number
consensusDelegates uint64 number of consensus delegates in the epoch
totalCandidates uint64 number of total delegates in the epoch
totalWeightedVotes string candidate total weighted votes in the epoch
votedTokens string total voted tokens in the epoch

Action Service API

ActionByDates

ActionByDates finds actions by dates

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByDates \
  --header 'Content-Type: application/json' \
  --data '{
    "startDate": 1624503172,
    "endDate": 1624503182,
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  ActionByDates(
    startDate: 1624503172
    endDate: 1624503182
    pagination: { skip: 0, first: 1 }
  ) {
    exist
    count
    actions {
      actHash
      blkHash
      timestamp
      actType
      sender
      recipient
      amount
      gasFee
      blkHeight
    }
  }
}

Example response:

{
  "data": {
    "ActionByDates": {
      "actions": [
        {
          "actHash": "55cd01e165839ce6c9047bc5b2997808a6177ee23d7194ebe3c2bad419356a02",
          "actType": "grantReward",
          "amount": "0",
          "blkHash": "6ef7a5d37d15bf71d8a9bb9dac87177d6594214ec18f8ce929327382a8b5a54f",
          "blkHeight": 11792456,
          "gasFee": "0",
          "recipient": "",
          "sender": "io1ha87fd54jmgmes5eswsyd52gwm0qjxnnsqlyl0",
          "timestamp": 1624503175
        }
      ],
      "count": 4,
      "exist": true
    }
  }
}

HTTP Request

POST /api.ActionService.ActionByDates

ActionByDatesRequest

Field Type Label Description
startDate uint64 start date in unix epoch time
endDate uint64 end date in unix epoch time
pagination pagination.Pagination

ActionByDatesResponse

Field Type Label Description
exist bool whether actions exist within the time frame
actions ActionInfo repeated
count uint64 total number of actions within the time frame

ActionInfo

Field Type Label Description
actHash string action hash
blkHash string block hash
actType string action type
sender string sender address
recipient string recipient address
amount string amount transferred
timestamp uint64 unix timestamp
gasFee string gas fee
blkHeight uint64 block height

ActionByHash

ActionByHash finds actions by hash

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByHash \
  --header 'Content-Type: application/json' \
  --data '{
    "actHash": "160a75d845c5ef35e6b2e697dc752066ee7a0dacf750c8c1a6a187090dd3df9f"
}'
query {
  ActionByHash(
    actHash: "160a75d845c5ef35e6b2e697dc752066ee7a0dacf750c8c1a6a187090dd3df9f"
  ) {
    actionInfo {
      actHash
      blkHash
      timestamp
      actType
      sender
      recipient
      amount
      gasFee
      blkHeight
    }
    evmTransfers {
      sender
      recipient
      amount
    }
  }
}

Example response:

{
  "data": {
    "ActionByHash": {
      "actionInfo": {
        "actHash": "160a75d845c5ef35e6b2e697dc752066ee7a0dacf750c8c1a6a187090dd3df9f",
        "actType": "depositToStake",
        "amount": "173450647808345216",
        "blkHash": "c1504d3181b3065a780f196d601358c0017546d659c7c3324931f16c27e3f135",
        "blkHeight": 17667450,
        "gasFee": "10000000000000000",
        "recipient": "",
        "sender": "io1unvkgm98ma3r2fnfrhep24arjxf6kc8stx0nuc",
        "timestamp": 1653981420
      },
      "evmTransfers": [
        {
          "amount": "10000000000000000",
          "recipient": "io0000000000000000000000rewardingprotocol",
          "sender": "io1unvkgm98ma3r2fnfrhep24arjxf6kc8stx0nuc"
        },
        {
          "amount": "173450647808345216",
          "recipient": "io000000000000000000000000stakingprotocol",
          "sender": "io1unvkgm98ma3r2fnfrhep24arjxf6kc8stx0nuc"
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionService.ActionByHash

ActionByHashRequest

Field Type Label Description
actHash string action hash

ActionByHashResponse

Field Type Label Description
exist bool whether actions exist within the time frame
actionInfo ActionInfo
evmTransfers ActionByHashResponse.EvmTransfers repeated

ActionByHashResponse.EvmTransfers

Field Type Label Description
sender string sender address
recipient string recipient address
amount string amount transferred

ActionByAddress

ActionByAddress finds actions by address

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
    "pagination": {
      "skip": 0,
      "first": 5
    }
}'
query {
  ActionByAddress(
    address: "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
    pagination:{skip:0, first:1}
  ) {
    count
    actions {
      actHash
      blkHash
      timestamp
      actType
      sender
      recipient
      amount
      gasFee
      blkHeight
    }
  }
}

Example response:

{
  "data": {
    "ActionByAddress": {
      "actions": [
        {
          "actHash": "a9eb718db8ec8832badc6bc930e6e1f01717fc9ca2126693c7457b10340f3b73",
          "actType": "transfer",
          "amount": "1000000000000000000000",
          "blkHash": "e6d90aac3af1277ebaafc8e56945037c3c9500732a67472651970caf7dc2da14",
          "blkHeight": 16306635,
          "gasFee": "10000000000000000",
          "recipient": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
          "sender": "io1z0r07tl77tvphmd8rluuh8h2sa2xqdkzpsuvrh",
          "timestamp": 1647148170
        }
      ],
      "count": 13693
    }
  }
}

HTTP Request

POST /api.ActionService.ActionByAddress

ActionByAddressRequest

Field Type Label Description
address string sender address or recipient address
pagination pagination.Pagination

ActionByAddressResponse

Field Type Label Description
exist bool whether actions exist for the given address
actions ActionInfo repeated
count uint64 total number of actions for the given address

ActionByType

ActionByType finds actions by action type

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByType \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "transfer",
    "pagination": {
      "skip": 0,
      "first": 5
    }
}'
query {
  ActionByType(
    type: "execution"
    pagination:{skip:0, first:1}
  ) {
    count
    actions {
      actHash
      blkHash
      timestamp
      actType
      sender
      recipient
      amount
      gasFee
      blkHeight
    }
  }
}

Example response:

{
  "data": {
    "ActionByType": {
      "actions": [
        {
          "actHash": "edf65e7ccbfb05e4fbd394db1acc276029c309994879e3a8c07023a753ea8886",
          "actType": "execution",
          "amount": "0",
          "blkHash": "ea06e52306ddcc02404427adcea7628a76a301c4a8f5f08b902a2ac672814292",
          "blkHeight": 5008,
          "gasFee": "1357294000000000000",
          "recipient": "",
          "sender": "io17ch0jth3dxqa7w9vu05yu86mqh0n6502d92lmp",
          "timestamp": 1555949160
        }
      ],
      "count": 15279705
    }
  }
}

HTTP Request

POST /api.ActionService.ActionByType

ActionByTypeRequest

Field Type Label Description
type string action type
pagination pagination.Pagination

ActionByTypeResponse

Field Type Label Description
exist bool whether actions exist for the given type
actions ActionInfo repeated
count uint64 total number of actions for the given type

EvmTransfersByAddress

EvmTransfersByAddress finds EVM transfers by address

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.EvmTransfersByAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "io14yqd25kr6k4zss59u7sq9hme4r862yfpezf9dx",
    "pagination": {
      "skip": 0,
      "first": 5
    }
}'
query {
  EvmTransfersByAddress(
    address: "io14yqd25kr6k4zss59u7sq9hme4r862yfpezf9dx"
    pagination: { skip: 0, first: 5 }
  ) {
    exist
    count
    evmTransfers {
      sender
      recipient
      actHash
      blkHash
      blkHeight
      amount
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "EvmTransfersByAddress": {
      "count": 303,
      "evmTransfers": [
        {
          "actHash": "fdc21e798a151b866de7adf02b9b2d5e479b96a1865af4aeb108cd4caa528e9a",
          "amount": "20180406453780587",
          "blkHash": "589324fef069e1ad9899989e0587eb1fb0fc6d20311dcec63850ecb41923360a",
          "blkHeight": 18183325,
          "recipient": "io14yqd25kr6k4zss59u7sq9hme4r862yfpezf9dx",
          "sender": "io16y9wk2xnwurvtgmd2mds2gcdfe2lmzad6dcw29",
          "timestamp": 1656565175
        },
        ...
      ],
      "exist": true
    }
  }
}

HTTP Request

POST /api.ActionService.EvmTransfersByAddress

EvmTransfersByAddressRequest

Field Type Label Description
address string sender address or recipient address
pagination pagination.Pagination

EvmTransfersByAddressResponse

Field Type Label Description
exist bool whether EVM transfers exist for the given address
count uint64 total number of EVM transfers for the given address
evmTransfers EvmTransfersByAddressResponse.EvmTransfer repeated

EvmTransfersByAddressResponse.EvmTransfer

Field Type Label Description
actHash string action hash
blkHash string block hash
sender string sender address
recipient string recipient address
amount string amount transferred
blkHeight uint64 block height
timestamp uint64 unix timestamp

XRC20 Service API

XRC20ByAddress

XRC20ByAddress returns Xrc20 actions given the sender address or recipient address

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.XRC20ByAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "io1mhvlzj7y2t9y2dtzauyvyzzrvle6l7sekcf245",
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC20ByAddress(
    address: "io1mhvlzj7y2t9y2dtzauyvyzzrvle6l7sekcf245"
    pagination: { skip: 0, first: 1 }
  ) {
    exist
    count
    xrc20 {
      actHash
      contract
      sender
      amount
      recipient
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "XRC20ByAddress": {
      "count": 4027,
      "exist": true,
      "xrc20": [
        {
          "actHash": "67b01c199e69164679b3fd5c34eb2e73d0d59840e28479321ad6ff15e4aa5c6d",
          "amount": "177600000000000000",
          "contract": "io1zl0el07pek4sly8dmscccnm0etd8xr8j02t4y7",
          "recipient": "io12w7agqdgwx7slp8fgcv7mnqvy3yf6j4tz0fnms",
          "sender": "io1mhvlzj7y2t9y2dtzauyvyzzrvle6l7sekcf245",
          "timestamp": 1656639570
        }
      ]
    }
  }
}

HTTP Request

POST /api.XRC20Service.XRC20ByAddress

XRC20ByAddressRequest

Field Type Label Description
address string sender address or recipient address
pagination pagination.Pagination

XRC20ByAddressResponse

Field Type Label Description
exist bool whether Xrc20 actions exist for the given sender address or recipient address
count uint64 total number of Xrc20 actions
xrc20 Xrc20Action repeated

Xrc20Action

Field Type Label Description
actHash string action hash
sender string sender address
recipient string recipient address
amount string amount transferred
timestamp uint64 unix timestamp
contract string contract address

XRC20ByContractAddress

XRC20ByContractAddress returns Xrc20 actions given the Xrc20 contract address

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.XRC20ByContractAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "io1gafy2msqmmmqyhrhk4dg3ghc59cplyhekyyu26",
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC20ByContractAddress(
    address: "io1gafy2msqmmmqyhrhk4dg3ghc59cplyhekyyu26"
    pagination: { skip: 0, first: 1 }
  ) {
    exist
    count
    xrc20 {
      actHash
      contract
      sender
      amount
      recipient
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "XRC20ByContractAddress": {
      "count": 1531013,
      "exist": true,
      "xrc20": [
        {
          "actHash": "40336444117c08caa48c9171a566069dfe374512b6d44bd260911a04a8d7424d",
          "amount": "312959963682432085397",
          "contract": "io1gafy2msqmmmqyhrhk4dg3ghc59cplyhekyyu26",
          "recipient": "io1h9kmk9x0e6mzhwmtq5eljqnj80agphyvcheky0",
          "sender": "io19kuwwxhtmtfdk9fnsfn0qs8je38svn7dwe93s4",
          "timestamp": 1656635825
        }
      ]
    }
  }
}

HTTP Request

POST /api.XRC20Service.XRC20ByContractAddress

XRC20ByContractAddressRequest

Field Type Label Description
address string contract address
pagination pagination.Pagination

XRC20ByContractAddressResponse

Field Type Label Description
exist bool whether Xrc20 actions exist for the given contract address
count uint64 total number of Xrc20 actions
xrc20 Xrc20Action repeated

XRC20ByPage

XRC20ByPage returns Xrc20 actions by pagination

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.XRC20ByPage \
  --header 'Content-Type: application/json' \
  --data '{
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC20ByPage(
    pagination: { skip: 0, first: 1 }
  ) {
    exist
    count
    xrc20 {
      actHash
      contract
      sender
      amount
      recipient
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "XRC20ByPage": {
      "count": 18238044,
      "exist": true,
      "xrc20": [
        {
          "actHash": "078895bc0ce32304203ecaa1dc1c7294226b356f9ea79d64c2b75e2817e4dbce",
          "amount": "10000000000000000",
          "contract": "io1zl0el07pek4sly8dmscccnm0etd8xr8j02t4y7",
          "recipient": "io1t7pkdvadx2mrnfukzvhsr0xhc2nsjuq9sren7p",
          "sender": "io14xf3pqwydy9vpzxflpqcry75ne5f47654f2rn9",
          "timestamp": 1656642185
        }
      ]
    }
  }
}

HTTP Request

POST /api.XRC20Service.XRC20ByPage

XRC20ByPageRequest

Field Type Label Description
pagination pagination.Pagination

XRC20ByPageResponse

Field Type Label Description
exist bool whether Xrc20 actions exist for the given contract address
count uint64 total number of Xrc20 actions
xrc20 Xrc20Action repeated

XRC20Addresses

Xrc20Addresses returns Xrc20 contract addresses

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.XRC20Addresses \
  --header 'Content-Type: application/json' \
  --data '{
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC20Addresses(
    pagination: { skip: 0, first: 2 }
  ) {
    exist
    count
    addresses
  }
}

Example response:

{
  "data": {
    "XRC20Addresses": {
      "addresses": [
        "io10098dx8ntlqy7sshqkdl67a8xp39vqsyjh08pv",
        "io1009dgua7q8x63dpk95wncnp79fx9mz0ak65a6s"
      ],
      "count": 2174,
      "exist": true
    }
  }
}

HTTP Request

POST /api.XRC20Service.XRC20Addresses

XRC20AddressesRequest

Field Type Label Description
pagination pagination.Pagination

XRC20AddressesResponse

Field Type Label Description
exist bool whether Xrc20 contract addresses exist
count uint64 total number of Xrc20 contract addresses
addresses string repeated

XRC20TokenHolderAddresses

XRC20TokenHolderAddresses returns Xrc20 token holder addresses given a Xrc20 contract address

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.XRC20TokenHolderAddresses \
  --header 'Content-Type: application/json' \
  --data '{
    "tokenAddress": "io1gafy2msqmmmqyhrhk4dg3ghc59cplyhekyyu26",
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC20TokenHolderAddresses(
    tokenAddress: "io1gafy2msqmmmqyhrhk4dg3ghc59cplyhekyyu26"
    pagination: { skip: 0, first: 5 }
  ) {
    count
    addresses
  }
}

Example response:

{
  "data": {
    "XRC20TokenHolderAddresses": {
      "addresses": [
        "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
        "io19czfrdyjt67g9tuhmmcjkuh2m9qxzv5nqyve9p",
        "io15lchlhad6dya59fncqtcfm44njwxm6m0j29aq9",
        "io10mk2dqu0e86x7urmadc34v7m3alqqy5l5t822r",
        "io1w4686k0r3fkjqghk694j43csgp8w073ge3s0f0"
      ],
      "count": 11245
    }
  }
}

HTTP Request

POST /api.XRC20Service.XRC20TokenHolderAddresses

XRC20TokenHolderAddressesRequest

Field Type Label Description
tokenAddress string token contract address
pagination pagination.Pagination

XRC20TokenHolderAddressesResponse

Field Type Label Description
count uint64 total number of token holder addresses
addresses string repeated

XRC721 Service API

XRC721ByAddress

XRC721ByAddress returns Xrc721 actions given the sender address or recipient address

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.XRC721ByAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "io1lutyka7aw7u872kzsujuz8pwn9qsrcjvs6e7jw",
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC721ByAddress(
    address: "io1lutyka7aw7u872kzsujuz8pwn9qsrcjvs6e7jw"
    pagination: { skip: 0, first: 6 }
  ) {
    exist
    count
    xrc721 {
      actHash
      contract
      sender
      amount
      recipient
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "XRC721ByAddress": {
      "count": 7,
      "exist": true,
      "xrc721": [
        {
          "actHash": "06de09b214d6f58f0af426388eed400b05e87078ef36b4dd723a6342f16afe61",
          "amount": "2273",
          "contract": "io1052s604n44atw5klykwff29tnrtsplqqkdajxf",
          "recipient": "io1lutyka7aw7u872kzsujuz8pwn9qsrcjvs6e7jw",
          "sender": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
          "timestamp": 1656631180
        }
      ]
    }
  }
}

HTTP Request

POST /api.XRC721Service.XRC721ByAddress

XRC721ByAddressRequest

Field Type Label Description
address string sender address or recipient address
pagination pagination.Pagination

XRC721ByAddressResponse

Field Type Label Description
exist bool whether Xrc721 actions exist for the given sender address or recipient address
count uint64 total number of Xrc721 actions
xrc721 Xrc721Action repeated

Xrc721Action

Field Type Label Description
actHash string action hash
sender string sender address
recipient string recipient address
amount string amount transferred
timestamp uint64 unix timestamp
contract string contract address

XRC721ByContractAddress

XRC721ByContractAddress returns Xrc721 actions given the Xrc721 contract address

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.XRC721ByContractAddress \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "io1052s604n44atw5klykwff29tnrtsplqqkdajxf",
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC721ByContractAddress(
    address: "io1052s604n44atw5klykwff29tnrtsplqqkdajxf"
    pagination: { skip: 0, first: 1 }
  ) {
    exist
    count
    xrc721 {
      actHash
      contract
      sender
      amount
      recipient
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "XRC721ByContractAddress": {
      "count": 2279,
      "exist": true,
      "xrc721": [
        {
          "actHash": "06de09b214d6f58f0af426388eed400b05e87078ef36b4dd723a6342f16afe61",
          "amount": "2273",
          "contract": "io1052s604n44atw5klykwff29tnrtsplqqkdajxf",
          "recipient": "io1lutyka7aw7u872kzsujuz8pwn9qsrcjvs6e7jw",
          "sender": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
          "timestamp": 1656631180
        }
      ]
    }
  }
}

HTTP Request

POST /api.XRC721Service.XRC721ByContractAddress

XRC721ByContractAddressRequest

Field Type Label Description
address string contract address
pagination pagination.Pagination

XRC721ByContractAddressResponse

Field Type Label Description
exist bool whether Xrc721 actions exist for the given contract address
count uint64 total number of Xrc721 actions
xrc721 Xrc721Action repeated

XRC721ByPage

XRC721ByPage returns Xrc721 actions by pagination

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.XRC721ByPage \
  --header 'Content-Type: application/json' \
  --data '{
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC721ByPage(
    pagination: { skip: 0, first: 1 }
  ) {
    exist
    count
    xrc721 {
      actHash
      contract
      sender
      amount
      recipient
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "XRC721ByPage": {
      "count": 7251522,
      "exist": true,
      "xrc721": [
        {
          "actHash": "57353c167e2a3fda74b16949f02e8b339f573a0039af1d5164ff6bb6819ea5fe",
          "amount": "2063879",
          "contract": "io1asxdtswkr9p6r9du57ecrhrql865tf2qxue6hw",
          "recipient": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
          "sender": "io1vygjfdnvv2jrg5szw82fusf9ea4nzz2s4fpy6e",
          "timestamp": 1656660620
        }
      ]
    }
  }
}

HTTP Request

POST /api.XRC721Service.XRC721ByPage

XRC721ByPageRequest

Field Type Label Description
pagination pagination.Pagination

XRC721ByPageResponse

Field Type Label Description
exist bool whether Xrc721 actions exist for the given contract address
count uint64 total number of Xrc721 actions
xrc721 Xrc721Action repeated

XRC721Addresses

Xrc20Addresses returns Xrc721 contract addresses

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.XRC721Addresses \
  --header 'Content-Type: application/json' \
  --data '{
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC721Addresses(
    pagination: { skip: 0, first: 2 }
  ) {
    exist
    count
    addresses
  }
}

Example response:

{
  "data": {
    "XRC721Addresses": {
      "addresses": [
        "io104z744srvrvxdtk0kzp7hkquqyxkvyt9uqz6u7",
        "io1052s604n44atw5klykwff29tnrtsplqqkdajxf"
      ],
      "count": 253,
      "exist": true
    }
  }
}

HTTP Request

POST /api.XRC721Service.XRC721Addresses

XRC721AddressesRequest

Field Type Label Description
pagination pagination.Pagination

XRC721AddressesResponse

Field Type Label Description
exist bool whether Xrc721 contract addresses exist
count uint64 total number of Xrc721 contract addresses
addresses string repeated

XRC721TokenHolderAddresses

XRC721TokenHolderAddresses returns Xrc721 token holder addresses given a Xrc721 contract address

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.XRC721TokenHolderAddresses \
  --header 'Content-Type: application/json' \
  --data '{
    "tokenAddress": "io1asxdtswkr9p6r9du57ecrhrql865tf2qxue6hw",
    "pagination": {
        "skip": 0,
        "first": 2
    }
}'
query {
  XRC721TokenHolderAddresses(
    tokenAddress: "io1asxdtswkr9p6r9du57ecrhrql865tf2qxue6hw"
    pagination: { skip: 0, first: 5 }
  ) {
    count
    addresses
  }
}

Example response:

{
  "data": {
    "XRC721TokenHolderAddresses": {
      "addresses": [
        "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
        "io1asxdtswkr9p6r9du57ecrhrql865tf2qxue6hw",
        "io19nja6v0jfxyxxt70xgrp248k429y5nkq6cstpq",
        "io1mt5u8vzxzuwq7hut99t9tvduhykzgkfclwlsgj",
        "io14qqv4xz8jzk3hexhmp9qdtdghdpamvyzuqajrd"
      ],
      "count": 6348
    }
  }
}

HTTP Request

POST /api.XRC721Service.XRC721TokenHolderAddresses

XRC721TokenHolderAddressesRequest

Field Type Label Description
tokenAddress string token contract address
pagination pagination.Pagination

XRC721TokenHolderAddressesResponse

Field Type Label Description
count uint64 total number of token holder addresses
addresses string repeated

Hermes Service API

Hermes

Hermes gives delegates who register the service of automatic reward distribution an overview of the reward distributions to their voters within a range of epochs

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.Hermes \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 22420,
    "epochCount": 1,
    "rewardAddress": "io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85"
}'
query {
    Hermes(
        startEpoch: 22420
        epochCount: 1
        rewardAddress: "io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85"
    ) {
        hermesDistribution {
            delegateName
            rewardDistribution {
                voterEthAddress
                voterIotexAddress
                amount
            }
            stakingIotexAddress
            voterCount
            waiveServiceFee
            refund
        }
    }
}

Example response:

{
    "hermesDistribution": [
        {
            "delegateName": "a4x",
            "rewardDistribution": [
                {
                    "voterEthAddress": "0x009faf509551ea0784b27f14f00c79d972393302",
                    "voterIotexAddress": "io1qz0675y4284q0p9j0u20qrrem9erjvczut23g2",
                    "amount": "810850817586367"
                },
                ...
            ],
            "stakingIotexAddress": "io1c2cacn26mawwg0vpx2ptnegg600q5kpmv75np0",
            "voterCount": "260",
            "waiveServiceFee": false,
            "refund": "5160457356723700049"
        },
        ...
}

HTTP Request

POST /api.HermesService.Hermes

HermesRequest

Field Type Label Description
startEpoch uint64 Start epoch number
epochCount uint64 Number of epochs to query
rewardAddress string Name of reward address

HermesResponse

Field Type Label Description
hermesDistribution HermesDistribution repeated

HermesDistribution

Field Type Label Description
delegateName string delegate name
rewardDistribution RewardDistribution repeated
stakingIotexAddress string delegate IoTeX staking address
voterCount uint64 number of voters
waiveServiceFee bool whether the delegate is qualified for waiving the service fee
refund string amount of refund

RewardDistribution

Field Type Label Description
voterEthAddress string voter’s ERC20 address
voterIotexAddress string voter’s IoTeX address
amount string amount of reward distribution

HermesByVoter

HermesByVoter returns Hermes voters' receiving history

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.HermesByVoter \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 13752,
    "epochCount": 24,
    "voterAddress": "io13hlj049e96gpdxfr0atkhq3d6mhgzxx7mrmg00",
  "pagination": {
        "skip": 0,
        "first": 5
    }  
}'
query {
  HermesByVoter(
    startEpoch: 13752
    epochCount: 24
    voterAddress: "io13hlj049e96gpdxfr0atkhq3d6mhgzxx7mrmg00",
    pagination:{skip: 0, first: 5}
  ){
    count
    exist
    delegates{
      delegateName
      fromEpoch
      toEpoch
      amount
      actHash
      timestamp
    }
    totalRewardReceived
  }
}

Example response:

{
  "data": {
    "HermesByVoter": {
      "count": 5,
      "delegates": [
        {
          "actHash": "4b9977a739c659967bc04729c71f5d10a0eb4368ad9c24d74f76251cbc174a0c",
          "amount": "188268667946402699",
          "delegateName": "iotexteam",
          "fromEpoch": 13728,
          "timestamp": 1605696600,
          "toEpoch": 13751
        },
        ....
      ],
      "exist": true,
      "totalRewardReceived": "946193665895943769"
    }
  }
}

HTTP Request

POST /api.HermesService.HermesByVoter

HermesByVoterRequest

Field Type Label Description
startEpoch uint64 Start epoch number
epochCount uint64 Number of epochs to query
voterAddress string voter address
pagination pagination.Pagination

HermesByVoterResponse

Field Type Label Description
exist bool whether the voter uses Hermes within the specified epoch range
delegates HermesByVoterResponse.Delegate repeated
count uint64 total number of reward receivings
totalRewardReceived string total reward amount received

HermesByVoterResponse.Delegate

Field Type Label Description
delegateName string delegate name
fromEpoch uint64 starting epoch of bookkeeping
toEpoch uint64 ending epoch of bookkeeping
amount string receiving amount
actHash string action hash
timestamp uint64 unix timestamp

HermesByDelegate

HermesByDelegate returns Hermes delegates' distribution history

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.HermesByDelegate \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 1,
    "delegateName": "a4x"
}'
query {
  HermesByDelegate(startEpoch: 20000, epochCount: 24, 
    delegateName: "a4x", pagination:{skip:0, first: 5}) {
    count
    exist
    distributionRatio{
      blockRewardRatio
      epochNumber
      epochRewardRatio
      foundationBonusRatio
    }
    totalRewardsDistributed
    voterInfoList{
      actionHash
      amount
      fromEpoch
      toEpoch
      timestamp
      voterAddress
    }
  }
}

Example response:

{
  "data": {
    "HermesByDelegate": {
      "count": 13,
      "distributionRatio": [
        {
          "blockRewardRatio": 70,
          "epochNumber": 20000,
          "epochRewardRatio": 70,
          "foundationBonusRatio": 70
        },
        ...
      ],
      "exist": true,
      "totalRewardsDistributed": "374486361904633758261",
      "voterInfoList": [
        {
          "actHash": "911dd38de79541b3eb066ee7a03e35121004255323d62040b97f536c9906cdda",
          "amount": "105463180053251824",
          "fromEpoch": 19992,
          "timestamp": 1628538750,
          "toEpoch": 20015,
          "voterAddress": "io13hlj049e96gpdxfr0atkhq3d6mhgzxx7mrmg00"
        }
      ]
    }
  }
}

HTTP Request

POST /api.HermesService.HermesByDelegate

HermesByDelegateRequest

Field Type Label Description
startEpoch uint64 Epoch number to start from
epochCount uint64 Number of epochs to query
delegateName string Name of the delegate
pagination pagination.Pagination Pagination info

HermesByDelegateResponse

Field Type Label Description
exist bool whether the delegate has hermes information within the specified epoch range
count uint64 total number of reward distributions
voterInfoList HermesByDelegateVoterInfo repeated
totalRewardsDistributed string total reward amount distributed
distributionRatio HermesByDelegateDistributionRatio repeated

HermesByDelegateVoterInfo

Field Type Label Description
voterAddress string voter address
fromEpoch uint64 starting epoch
toEpoch uint64 ending epoch
amount string distributino amount
actionHash string action hash
timestamp string timestamp

HermesByDelegateDistributionRatio

Field Type Label Description
epochNumber uint64 epoch number
blockRewardRatio double ratio of block reward being distributed
epochRewardRatio double ratio of epoch reward being distributed
foundationBonusRatio double ratio of foundation bonus being distributed

HermesMeta

HermesMeta provides Hermes platform metadata

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.HermesMeta \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 24
}'
query {
  HermesMeta(startEpoch: 20000, epochCount: 24) {
    exist
    numberOfDelegates
    numberOfRecipients
    totalRewardDistributed
  }
}


Example response:

{
  "data": {
    "HermesMeta": {
      "exist": true,
      "numberOfDelegates": 41,
      "numberOfRecipients": 3871,
      "totalRewardDistributed": "342227806235546638245097"
    }
  }
}

HTTP Request

POST /api.HermesService.HermesMeta

HermesMetaRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count

HermesMetaResponse

Field Type Label Description
exist bool whether Hermes has bookkeeping information within the specified epoch range
numberOfDelegates uint64 number of Hermes delegates within the epoch range
numberOfRecipients uint64 number of voters who vote for Hermes delegates within the epoch range
totalRewardDistributed string total reward amount distributed within the epoch range

HermesAverageStats

HermesAverageStats returns the Hermes average statistics

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.HermesAverageStats \
  --header 'Content-Type: application/json' \
  --data '{
    "startEpoch": 20000,
    "epochCount": 24,
  "rewardAddress": "io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85"
}'
query {
  HermesAverageStats(
    startEpoch: 20000
    epochCount: 24
    rewardAddress: "io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85"
  ) {
    exist
    averagePerEpoch {
      delegateName
      rewardDistribution
      totalWeightedVotes
    }
  }
}

Example response:

{
  "data": {
    "HermesAverageStats": {
      "averagePerEpoch": [
        {
          "delegateName": "a4x",
          "rewardDistribution": "10939144171268859553",
          "totalWeightedVotes": "2897825174867095605694136"
        },
        ...
      ],
      "exist": true
    }
  }
}

HTTP Request

POST /api.HermesService.HermesAverageStats

HermesAverageStatsRequest

Field Type Label Description
startEpoch uint64 starting epoch number
epochCount uint64 epoch count
rewardAddress string Name of reward address

HermesAverageStatsResponse

Field Type Label Description
exist bool whether Hermes has bookkeeping information within the specified epoch range
averagePerEpoch HermesAverageStatsResponse.AveragePerEpoch repeated

HermesAverageStatsResponse.AveragePerEpoch

Field Type Label Description
delegateName string delegate name
rewardDistribution string reward distribution amount on average
totalWeightedVotes string total weighted votes on average