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.

API Token

API token is required to access the API. You can generate a JWT token using the ioctl command-line tool — see ioctl JWT Auth Tokens for details.

ioctl jwt sign --with-arguments '{"exp":"1767024000","sub":"AnalyserAPI","scope":"Read"}' -s user

use generated token to access the API

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.Chain \
  --header 'Content-Type: application/json' \
  --data '{}' \
  --header 'Authorization: Bearer <TOKEN>'

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

GetLatestBlockHeight

GetLatestBlockHeight returns the latest block height.

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

Example response:

{
  "data": {
    "GetLatestBlockHeight": {
      "height": 19000000
    }
  }
}

HTTP Request

POST /api.ChainService.GetLatestBlockHeight

GetLatestBlockHeightRequest

(no fields)

GetLatestBlockHeightResponse

Field Type Label Description
height uint64 latest block height

GetBlocks

GetBlocks returns a paginated list of blocks. Use before_height as a cursor for client-controlled pagination.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetBlocks \
  --header 'Content-Type: application/json' \
  --data '{
  "page": 1,
  "limit": 10
}'
query {
  GetBlocks(page: 1, limit: 10) {
    blocks {
      block_height
      block_hash
      producer_address
      num_actions
      timestamp
      gas_consumed
      producer_name
      block_reward
      epoch_num
      priority_bonus
      base_fee
    }
  }
}

Example response:

{
  "data": {
    "GetBlocks": {
      "blocks": [
        {
          "base_fee": "1000000000",
          "block_hash": "abc123...",
          "block_height": 19000000,
          "block_reward": "900000000000000000",
          "epoch_num": 28900,
          "gas_consumed": 21000,
          "num_actions": 3,
          "priority_bonus": "0",
          "producer_address": "io1...",
          "producer_name": "iotexlab",
          "timestamp": 1714000000
        }
      ]
    }
  }
}

HTTP Request

POST /api.ChainService.GetBlocks

GetBlocksRequest

Field Type Label Description
page uint64 page number (starts from 1); ignored when before_height > 0
limit uint64 number of blocks per page
before_height uint64 cursor: return blocks with height <= before_height (0 = use page)

GetBlocksResponse

Field Type Label Description
blocks BlockInfo repeated list of blocks

BlockInfo

Field Type Label Description
block_height uint64 block height
block_hash string block hash
producer_address string producer address
num_actions uint64 number of actions
timestamp int64 block timestamp (unix)
gas_consumed uint64 gas consumed
producer_name string producer name
block_reward string block reward
epoch_num uint64 epoch number
priority_bonus string priority bonus
base_fee string base fee

GetBlockByHeight

GetBlockByHeight returns a single block by its height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetBlockByHeight \
  --header 'Content-Type: application/json' \
  --data '{
  "height": 19000000
}'
query {
  GetBlockByHeight(height: 19000000) {
    exist
    block {
      block_height
      block_hash
      producer_name
      num_actions
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "GetBlockByHeight": {
      "exist": true,
      "block": {
        "block_height": 19000000,
        "block_hash": "abc123...",
        "producer_name": "iotexlab",
        "num_actions": 3,
        "timestamp": 1714000000
      }
    }
  }
}

HTTP Request

POST /api.ChainService.GetBlockByHeight

GetBlockByHeightRequest

Field Type Label Description
height uint64 block height

GetBlockByHeightResponse

Field Type Label Description
exist bool whether the block exists
block BlockInfo block information

GetEpochInfo

GetEpochInfo returns the current epoch number and its starting block height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetEpochInfo \
  --header 'Content-Type: application/json' \
  --data '{}'

Example response:

{
  "epoch_height": 18980001,
  "epoch_num": 28884
}

HTTP Request

POST /api.ChainService.GetEpochInfo

GetEpochInfoRequest

(no fields)

GetEpochInfoResponse

Field Type Label Description
epoch_height uint64 first block height of the current epoch
epoch_num uint64 current epoch number

GetLatestStakingRecord

GetLatestStakingRecord returns the most recent staking statistics.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetLatestStakingRecord \
  --header 'Content-Type: application/json' \
  --data '{}'

Example response:

{
  "total_supply": "9457829326969999922855499899",
  "all_staking": "3743652944403254009755212860",
  "staking_ratio": "0.3959"
}

HTTP Request

POST /api.ChainService.GetLatestStakingRecord

GetLatestStakingRecordRequest

(no fields)

GetLatestStakingRecordResponse

Field Type Label Description
total_supply string total supply
all_staking string total staked IOTX (in rau)
staking_ratio string staking ratio (decimal string)

GetPeakTps

GetPeakTps returns the all-time peak TPS (max block action count / 5-second block time). Supports incremental cursor-based scanning.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetPeakTps \
  --header 'Content-Type: application/json' \
  --data '{
  "start_block_height": 0
}'

Example response:

{
  "num_actions": "42.60",
  "block_height": 19000000
}

HTTP Request

POST /api.ChainService.GetPeakTps

GetPeakTpsRequest

Field Type Label Description
start_block_height uint64 0 = scan all blocks; > 0 = only look at blocks after this height (cursor for incremental updates)

GetPeakTpsResponse

Field Type Label Description
num_actions string peak TPS (max block actions / 5), rounded to 2 decimal places
block_height uint64 current max block height (cursor for next call)

GetActionHistory

GetActionHistory returns aggregated action counts bucketed by time interval.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetActionHistory \
  --header 'Content-Type: application/json' \
  --data '{
  "start_time": "2024-01-01 00:00:00",
  "end_time": "2024-01-02 00:00:00",
  "interval": "hour"
}'

Example response:

{
  "data": [
    { "date": "2024-01-01 00:00:00", "sum": 1234 },
    { "date": "2024-01-01 01:00:00", "sum": 987 }
  ]
}

HTTP Request

POST /api.ChainService.GetActionHistory

GetActionHistoryRequest

Field Type Label Description
start_time string UTC datetime string (e.g. "2024-01-01 00:00:00")
end_time string UTC datetime string
interval string bucket size: "minute", "hour", or "day"

GetActionHistoryResponse

Field Type Label Description
data ActionHistoryPoint repeated list of time-bucketed action counts

ActionHistoryPoint

Field Type Label Description
date string UTC datetime string
sum uint64 total actions in bucket

GetStakingRatioHistory

GetStakingRatioHistory returns the daily staking ratio over a time range.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ChainService.GetStakingRatioHistory \
  --header 'Content-Type: application/json' \
  --data '{
  "start_time": "2024-01-01",
  "end_time": "2024-01-31"
}'

Example response:

{
  "data": [
    { "date_time": "2024-01-01", "ratio": "0.3959" },
    { "date_time": "2024-01-02", "ratio": "0.3961" }
  ]
}

HTTP Request

POST /api.ChainService.GetStakingRatioHistory

GetStakingRatioHistoryRequest

Field Type Label Description
start_time string optional start date (YYYY-MM-DD)
end_time string optional end date (YYYY-MM-DD)

GetStakingRatioHistoryResponse

Field Type Label Description
data StakingRatioPoint repeated list of daily staking ratio data points

StakingRatioPoint

Field Type Label Description
date_time string date
ratio string staking ratio (decimal string)

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
    },
    "epochRewardPerc": 90,
    "blockRewardPerc": 100,
    "foundationBonusPerc": 0
}'
query {
  BookKeeping(
    startEpoch: 23328
    epochCount: 10
    delegateName: "iotexlab"
    epochRewardPerc: 90
    foundationBonusPerc: 0
    blockRewardPerc: 100
    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
epochRewardPerc uint64 percentage of the epoch reward to be paid to the delegate
blockRewardPerc uint64 percentage of the block reward to be paid to the delegate
foundationBonusPerc uint64 percentage of the foundation bonus to be paid to the delegate

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

PaidToDelegates

PaidToDelegates returns the total reward amounts paid to each delegate for a given schedule (daily or monthly) and date.

curl --request POST \
  --url https://analyser-api.iotex.io/api.DelegateService.PaidToDelegates \
  --header 'Content-Type: application/json' \
  --data '{
  "schedule": "DAILY",
  "date": "2024-01-15"
}'
query {
  PaidToDelegates(schedule: DAILY, date: "2024-01-15") {
    delegateInfo {
      delegateName
      amount
      blockReward
      epochReward
      foundationBonus
    }
  }
}

Example response:

{
  "data": {
    "PaidToDelegates": {
      "delegateInfo": [
        {
          "delegateName": "iotexlab",
          "amount": "12000000000000000000",
          "blockReward": "4000000000000000000",
          "epochReward": "6000000000000000000",
          "foundationBonus": "2000000000000000000"
        }
      ]
    }
  }
}

HTTP Request

POST /api.DelegateService.PaidToDelegates

PaidToDelegatesRequest

Field Type Label Description
schedule PaidToDelegatesRequest.Schedule MONTHLY (0) or DAILY (1)
date string date string (YYYY-MM-DD)

PaidToDelegatesResponse

Field Type Label Description
delegateInfo PaidToDelegatesResponse.DelegateInfo repeated list of delegate reward info

PaidToDelegatesResponse.DelegateInfo

Field Type Label Description
delegateName string delegate name
amount string total reward amount
blockReward string block reward portion
epochReward string epoch reward portion
foundationBonus string foundation bonus portion

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

ContractInfo

ContractInfo returns contract info

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.ContractInfo \
  --header 'Content-Type: application/json' \
  --data '{
    "contractAddress": ["io1yf0rvr34yxwjcx70t0x5rzz0skzurccy8wgpwe","io1mcy7wn2g3z7yue04385vzw7wnacamax8aaahn6"]
}'
query {
  ContractInfo(
    contractAddress: [
      "io1yf0rvr34yxwjcx70t0x5rzz0skzurccy8wgpwe"
      "io1mcy7wn2g3z7yue04385vzw7wnacamax8aaahn6"
    ]
  ) {
    contracts {
            contractAddress
      deployer
      createTime
      exist
      callTimes
      accumulatedGas
    }
  }
}

Example response:

{
  "data": {
    "ContractInfo": {
      "contracts": [
        {
          "accumulatedGas": "",
          "callTimes": 0,
          "contractAddress": "io1yf0rvr34yxwjcx70t0x5rzz0skzurccy8wgpwe",
          "createTime": "",
          "deployer": "",
          "exist": false
        },
        {
          "accumulatedGas": "0.174381",
          "callTimes": 3,
          "contractAddress": "io1mcy7wn2g3z7yue04385vzw7wnacamax8aaahn6",
          "createTime": "2019-04-25 01:45:20 +0000 UTC",
          "deployer": "io10e0525sfrf53yh2aljmm3sn9jq5njk7l6jfauj",
          "exist": true
        }
      ]
    }
  }
}

HTTP Request

POST /api.AccountService.ContractInfo

ContractInfoRequest

Field Type Label Description
contractAddress string repeated contract address

ContractInfoResponse

Field Type Label Description
contracts ContractInfoResponse.Contract repeated

ContractInfoResponse.Contract

Field Type Label Description
exist bool whether the contract address exists
deployer string contract creator
createTime string contract create time
callTimes uint64 contract call times
accumulatedGas string accumulated transaction fee
contractAddress string contract address

Erc20TokenBalanceByHeight

Erc20TokenBalanceByHeight returns the ERC20 token balance of given addresses at a specific block height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.Erc20TokenBalanceByHeight \
  --header 'Content-Type: application/json' \
  --data '{
  "address": ["io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"],
  "height": 19000000,
  "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw"
}'
query {
  Erc20TokenBalanceByHeight(
    address: ["io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"]
    height: 19000000
    contract_address: "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw"
  ) {
    height
    contract_address
    balance
    decimals
  }
}

Example response:

{
  "data": {
    "Erc20TokenBalanceByHeight": {
      "height": 19000000,
      "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
      "balance": ["1000000000000000000"],
      "decimals": 18
    }
  }
}

HTTP Request

POST /api.AccountService.Erc20TokenBalanceByHeight

Erc20TokenBalanceByHeightRequest

Field Type Label Description
address string repeated list of addresses
height uint64 block height
contract_address string ERC20 contract address

Erc20TokenBalanceByHeightResponse

Field Type Label Description
height uint64 block height
contract_address string ERC20 contract address
balance string repeated balance list (in token units)
decimals uint64 token decimals

GetAccountMeta

GetAccountMeta returns account metadata including whether the address is a contract and its bytecode hash.

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.GetAccountMeta \
  --header 'Content-Type: application/json' \
  --data '{
  "addresses": ["io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"]
}'

Example response:

{
  "accounts": [
    {
      "address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
      "is_contract": false,
      "block_height": 0,
      "contract_bytecode_hash": ""
    }
  ]
}

HTTP Request

POST /api.AccountService.GetAccountMeta

GetAccountMetaRequest

Field Type Label Description
addresses string repeated list of addresses to query

GetAccountMetaResponse

Field Type Label Description
accounts AccountMetaInfo repeated list of account metadata

AccountMetaInfo

Field Type Label Description
address string account address
is_contract bool whether the address is a contract
block_height uint64 block height at contract creation (0 for non-contracts)
contract_bytecode_hash string SHA256 hash of contract bytecode

GetContractCreateInfo

GetContractCreateInfo returns the creation action hash and creator address for a given contract.

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.GetContractCreateInfo \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw"
}'

Example response:

{
  "action_hash": "abc123...",
  "creator": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
}

HTTP Request

POST /api.AccountService.GetContractCreateInfo

GetContractCreateInfoRequest

Field Type Label Description
address string contract address

GetContractCreateInfoResponse

Field Type Label Description
action_hash string creation action hash
creator string creator address

GetAddressNFTBalances

GetAddressNFTBalances returns the NFT (XRC721/XRC1155) token balances held by an address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.GetAddressNFTBalances \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
}'

Example response:

{
  "balances": [
    {
      "contract_address": "io1nft...",
      "type": "xrc721",
      "balance": "3"
    }
  ]
}

HTTP Request

POST /api.AccountService.GetAddressNFTBalances

GetAddressNFTBalancesRequest

Field Type Label Description
address string wallet address

GetAddressNFTBalancesResponse

Field Type Label Description
balances NFTBalanceInfo repeated list of NFT balances per contract

NFTBalanceInfo

Field Type Label Description
contract_address string NFT contract address
type string token standard: "xrc721" or "xrc1155"
balance string balance

GetAddressTokenBalances

GetAddressTokenBalances returns the ERC20 token balances held by an address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.GetAddressTokenBalances \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
}'

Example response:

{
  "balances": [
    {
      "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
      "balance": "1000000000000000000"
    }
  ]
}

HTTP Request

POST /api.AccountService.GetAddressTokenBalances

GetAddressTokenBalancesRequest

Field Type Label Description
address string wallet address

GetAddressTokenBalancesResponse

Field Type Label Description
balances TokenBalanceInfo repeated list of ERC20 token balances

TokenBalanceInfo

Field Type Label Description
contract_address string ERC20 contract address
balance string balance (in raw units)

GetTopAccounts

GetTopAccounts returns top stakers filtered by stake amount, duration, and mf (momentum factor).

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.GetTopAccounts \
  --header 'Content-Type: application/json' \
  --data '{
  "pagination": { "skip": 0, "first": 10 },
  "stake_amount": "more",
  "stake_duration": "more"
}'

Example response:

{
  "count": 1234,
  "accounts": [
    {
      "owner_address": "io1...",
      "bucket_id": 1001,
      "staked_amount": "10000000000000000000000",
      "duration": "91 days",
      "mf": "1.00",
      "last_update": "2024-01-15",
      "balance": "50000000000000000000000"
    }
  ]
}

HTTP Request

POST /api.AccountService.GetTopAccounts

GetTopAccountsRequest

Field Type Label Description
pagination pagination.Pagination pagination info
stake_amount string "more" (>= 10000 IOTX) or "less"
stake_duration string "more" (>= 91 days) or "less"
mf string "hold" (mf > 0) or "" (mf = 0)

GetTopAccountsResponse

Field Type Label Description
count int64 total number of matching accounts
accounts TopAccountRow repeated list of top accounts

TopAccountRow

Field Type Label Description
owner_address string account address
bucket_id uint64 staking bucket ID
staked_amount string staked amount
duration string stake duration
mf string momentum factor
last_update string last update time
balance string IOTX balance

GetTopAccountsByBalance

GetTopAccountsByBalance returns the top accounts ranked by IOTX net balance (inflow minus outflow).

curl --request POST \
  --url https://analyser-api.iotex.io/api.AccountService.GetTopAccountsByBalance \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": 10,
  "offset": 0
}'

Example response:

{
  "count": 5000,
  "accounts": [
    {
      "address": "io1...",
      "balance": "123456789000000000000000",
      "total_actions": 500
    }
  ]
}

HTTP Request

POST /api.AccountService.GetTopAccountsByBalance

GetTopAccountsByBalanceRequest

Field Type Label Description
limit int64 number of records to return
offset int64 starting offset

GetTopAccountsByBalanceResponse

Field Type Label Description
count int64 total number of accounts
accounts AccountBalanceRow repeated list of accounts

AccountBalanceRow

Field Type Label Description
address string account address
balance string net balance (inflow - outflow) in rau
total_actions int64 total number of actions

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

GetCurrentDelegates

GetCurrentDelegates returns the current delegate list ordered by vote weight.

curl --request POST \
  --url https://analyser-api.iotex.io/api.VotingService.GetCurrentDelegates \
  --header 'Content-Type: application/json' \
  --data '{}'
query {
  GetCurrentDelegates {
    exist
    delegates {
      id
      name
      vote_weight
      productivity
      candidate
      operator_address
      active
      block_height
    }
  }
}

Example response:

{
  "data": {
    "GetCurrentDelegates": {
      "exist": true,
      "delegates": [
        {
          "id": 1,
          "name": "iotexlab",
          "vote_weight": "3079386720450377171762829252",
          "productivity": 0.9998,
          "candidate": "io1...",
          "operator_address": "io1...",
          "active": true,
          "block_height": 19000000
        }
      ]
    }
  }
}

HTTP Request

POST /api.VotingService.GetCurrentDelegates

GetCurrentDelegatesRequest

(no fields)

GetCurrentDelegatesResponse

Field Type Label Description
exist bool whether delegates exist
delegates CurrentDelegateInfo repeated list of current delegates

CurrentDelegateInfo

Field Type Label Description
id uint64 internal id
name string delegate name
vote_weight string total vote weight
productivity double block production productivity
candidate string candidate address
operator_address string operator address
active bool whether currently active
block_height uint64 block height of last update

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
gasPrice string gas price
gasLimit uint64 gas limit
gasConsumed uint64 gas consumed
nonce uint64 nonce
status uint64 execution status
contractAddress string contract address
executionRevertMsg string execution revert message
chainId uint64 chain id
methodName string method name

ActionByHash

ActionByHash finds actions by hash. Use the optional include_fields parameter to request additional data (each field triggers a separate DB query).

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByHash \
  --header 'Content-Type: application/json' \
  --data '{
    "actHash": "160a75d845c5ef35e6b2e697dc752066ee7a0dacf750c8c1a6a187090dd3df9f",
    "include_fields": ["action_type", "logs", "token_transfers"]
}'
query {
  ActionByHash(
    actHash: "160a75d845c5ef35e6b2e697dc752066ee7a0dacf750c8c1a6a187090dd3df9f"
    include_fields: ["action_type", "logs", "token_transfers"]
  ) {
    actionInfo {
      actHash
      blkHash
      timestamp
      actType
      sender
      recipient
      amount
      gasFee
      blkHeight
      methodName
    }
    evmTransfers {
      sender
      recipient
      amount
    }
    action_type_info {
      type
      gas_tip_cap
      gas_fee_cap
    }
    logs {
      block_height
      address
      topic0
      data
    }
    token_transfers {
      contract_address
      sender
      recipient
      amount
      type
    }
    block_base_fee
    stake_action {
      bucket_id
      amount
      candidate
      act_type
    }
  }
}

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
include_fields string repeated optional subset of extra fields to fetch: action_type, input_data, logs, token_transfers, base_fee, stake_action; empty = none

ActionByHashResponse

Field Type Label Description
exist bool whether action exists
actionInfo ActionInfo
evmTransfers ActionByHashResponse.EvmTransfers repeated
action_type_info ActionByHashResponse.ActionTypeInfo EIP-2930/1559/4844 type info (requires action_type in include_fields)
input_data string hex-encoded execution input data (requires input_data in include_fields)
logs ActionByHashResponse.ActionLog repeated transaction logs (requires logs in include_fields)
token_transfers ActionByHashResponse.TokenTransfer repeated ERC20/NFT token transfers (requires token_transfers in include_fields)
block_base_fee string block base fee in rau (requires base_fee in include_fields)
stake_action ActionByHashResponse.StakeAction staking action details (requires stake_action in include_fields)

ActionByHashResponse.EvmTransfers

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

ActionByHashResponse.ActionTypeInfo

Field Type Label Description
type string transaction type
access_list string EIP-2930 access list (JSON)
gas_tip_cap string EIP-1559 gas tip cap
gas_fee_cap string EIP-1559 gas fee cap
blob_gas string EIP-4844 blob gas
blob_fee_cap string EIP-4844 blob fee cap
blob_hashes string EIP-4844 blob hashes
blob_gas_price string EIP-4844 blob gas price

ActionByHashResponse.ActionLog

Field Type Label Description
block_height uint64 block height
address string contract address emitting the log
topic0 string first log topic
topic1 string second log topic
topic2 string third log topic
topic3 string fourth log topic
data bytes raw log data (base64-encoded in JSON)
action_hash string action hash
index int64 log index in block

ActionByHashResponse.TokenTransfer

Field Type Label Description
id int64 record id
contract_address string token contract address
sender string sender address
recipient string recipient address
amount string token amount
type string transfer type: "erc20" or "nft"

ActionByHashResponse.StakeAction

Field Type Label Description
bucket_id int64 staking bucket ID
amount string action amount
staked_amount string staked amount in bucket
duration string stake duration
auto_stake bool whether auto-stake is enabled
candidate string candidate name
act_type string stake action type
owner_address string bucket owner address

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
sender string optional: filter by sender address
recipient string optional: filter by recipient address
actionType string optional: filter by action type
startTime string optional: start time filter (ISO 8601)
endTime string optional: end time filter (ISO 8601)

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

ActionByVoter

ActionByVoter returns actions by voter address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByVoter \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io19msajm9hv4u793jvnwcy23plkwzffywjh257sz",
  "pagination": { "skip": 0, "first": 10 }
}'
query {
  ActionByVoter(
    address: "io19msajm9hv4u793jvnwcy23plkwzffywjh257sz"
    pagination: { skip: 0, first: 10 }
  ) {
    exist
    count
    actionList {
      actHash
      actType
      amount
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "ActionByVoter": {
      "exist": true,
      "count": 42,
      "actionList": [
        {
          "actHash": "abc123...",
          "actType": "stakeCreate",
          "amount": "100000000000000000000",
          "timestamp": 1714000000
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionService.ActionByVoter

ActionRequest (ActionByVoter)

Field Type Label Description
address string voter address
actHash string action hash (optional)
pagination pagination.Pagination pagination info

ActionResponse (ActionByVoter)

Field Type Label Description
exist bool whether actions exist
count uint64 total number of actions
actionList ActionInfo repeated list of actions
evmTransferList EvmTransferInfo repeated list of EVM transfers
xrcList XrcInfo repeated list of XRC20 transfers

GetXrc20ByAddress

GetXrc20ByAddress returns XRC20 transfers by address (ActionService version).

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.GetXrc20ByAddress \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io19msajm9hv4u793jvnwcy23plkwzffywjh257sz",
  "pagination": { "skip": 0, "first": 10 }
}'
query {
  GetXrc20ByAddress(
    address: "io19msajm9hv4u793jvnwcy23plkwzffywjh257sz"
    pagination: { skip: 0, first: 10 }
  ) {
    exist
    count
    xrcList {
      actHash
      from
      to
      quantity
      timestamp
      contract
    }
  }
}

Example response:

{
  "data": {
    "GetXrc20ByAddress": {
      "exist": true,
      "count": 25,
      "xrcList": [
        {
          "actHash": "abc123...",
          "from": "io1...",
          "to": "io1...",
          "quantity": "1000000000000000000",
          "timestamp": 1714000000,
          "contract": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw"
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionService.GetXrc20ByAddress

XrcInfo

Field Type Label Description
actHash string action hash
from string sender address
to string recipient address
quantity string token amount
blkHeight uint64 block height
timestamp uint64 unix timestamp
contract string token contract address

ActionList

ActionList returns the latest actions with pagination. Use start_block_height to enable PostgreSQL partition pruning for faster queries.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionList \
  --header 'Content-Type: application/json' \
  --data '{
  "pagination": { "skip": 0, "first": 20 },
  "start_block_height": 18000000
}'
query {
  ActionList(
    pagination: { skip: 0, first: 20 }
    start_block_height: 18000000
  ) {
    exist
    count
    actions {
      actHash
      actType
      sender
      recipient
      amount
      blkHeight
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "ActionList": {
      "exist": true,
      "count": 1000000,
      "actions": [
        {
          "actHash": "abc123...",
          "actType": "transfer",
          "sender": "io1...",
          "recipient": "io1...",
          "amount": "1000000000000000000",
          "blkHeight": 19000000,
          "timestamp": 1714000000
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionService.ActionList

ActionListRequest

Field Type Label Description
pagination pagination.Pagination pagination info
start_block_height uint64 optional: enables partition pruning for queries starting at this block height

ActionListResponse

Field Type Label Description
exist bool whether actions exist
count uint64 total number of actions
actions ActionInfo repeated list of actions

ActionByHeight

ActionByHeight returns actions at a specific block height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ActionByHeight \
  --header 'Content-Type: application/json' \
  --data '{
  "height": 19000000,
  "pagination": { "skip": 0, "first": 50 }
}'
query {
  ActionByHeight(height: 19000000, pagination: { skip: 0, first: 50 }) {
    exist
    count
    actions {
      actHash
      actType
      sender
      recipient
      amount
    }
  }
}

Example response:

{
  "data": {
    "ActionByHeight": {
      "exist": true,
      "count": 3,
      "actions": [
        {
          "actHash": "abc123...",
          "actType": "transfer",
          "sender": "io1...",
          "recipient": "io1...",
          "amount": "1000000000000000000"
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionService.ActionByHeight

ActionByHeightRequest

Field Type Label Description
height uint64 block height
pagination pagination.Pagination pagination info

ActionByHeightResponse

Field Type Label Description
exist bool whether actions exist at this height
count uint64 total number of actions
actions ActionInfo repeated list of actions

ContractInteractors

ContractInteractors returns the distinct sender addresses that have interacted with a given contract, optionally filtered by start time.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.ContractInteractors \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
  "startTime": "2024-01-01T00:00:00Z"
}'
query {
  ContractInteractors(
    address: "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw"
    startTime: "2024-01-01T00:00:00Z"
  ) {
    senders
  }
}

Example response:

{
  "data": {
    "ContractInteractors": {
      "senders": [
        "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
        "io1..."
      ]
    }
  }
}

HTTP Request

POST /api.ActionService.ContractInteractors

ContractInteractorsRequest

Field Type Label Description
address string contract address
startTime string optional: filter interactions after this time (ISO 8601)

ContractInteractorsResponse

Field Type Label Description
senders string repeated list of distinct sender addresses

GetInternalTxns

GetInternalTxns returns a paginated list of EVM internal transactions.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.GetInternalTxns \
  --header 'Content-Type: application/json' \
  --data '{
  "pagination": { "skip": 0, "first": 20 }
}'

Example response:

{
  "txns": [
    {
      "id": 1001,
      "block_height": 19000000,
      "action_hash": "abc123...",
      "type": "execution",
      "amount": "1000000000000000000",
      "sender": "io1...",
      "recipient": "io1...",
      "timestamp": "2024-01-15T10:00:00Z"
    }
  ],
  "count": 5000000
}

HTTP Request

POST /api.ActionService.GetInternalTxns

GetInternalTxnsRequest

Field Type Label Description
pagination pagination.Pagination pagination info

GetInternalTxnsResponse

Field Type Label Description
txns InternalTxnInfo repeated list of internal transactions
count uint64 total number of internal transactions

InternalTxnInfo

Field Type Label Description
id int64 record id
block_height uint64 block height
action_hash string action hash
type string transaction type
amount string transfer amount
sender string sender address
recipient string recipient address
timestamp string timestamp

GetStakingActionsByAddress

GetStakingActionsByAddress returns paginated staking actions for a given owner address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionService.GetStakingActionsByAddress \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
  "pagination": { "skip": 0, "first": 20 }
}'

Example response:

{
  "actions": [
    {
      "id": 1,
      "block_height": 19000000,
      "action_hash": "abc123...",
      "sender": "io1...",
      "amount": "10000000000000000000000",
      "action_type": "stakeCreate",
      "timestamp": "2024-01-15T10:00:00Z"
    }
  ],
  "count": 50
}

HTTP Request

POST /api.ActionService.GetStakingActionsByAddress

GetStakingActionsByAddressRequest

Field Type Label Description
owner_address string bucket owner address
pagination pagination.Pagination pagination info

GetStakingActionsByAddressResponse

Field Type Label Description
actions StakingActionInfo repeated list of staking actions
count uint64 total number of staking actions

StakingActionInfo

Field Type Label Description
id int64 record id
block_height uint64 block height
action_hash string action hash
sender string sender address
amount string action amount
action_type string staking action type
timestamp string timestamp

Staking Service API

VoteByHeight

Get the stake amount and voting weight of the voter's specified height

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.VoteByHeight \
  --header 'Content-Type: application/json' \
  --data '{
    "address": ["io1k0w5vtlglnm742jacv2xjczg5l3s44gyy6h536","io1p8dwgkkgzcpwz6snwzh5v2nhf658gw8aen47pw"],
    "height": 20924943
}'
query {
  VoteByHeight(
    address: [
      "io1k0w5vtlglnm742jacv2xjczg5l3s44gyy6h536"
      "io1p8dwgkkgzcpwz6snwzh5v2nhf658gw8aen47pw"
    ]
    height: 20924943
  ) {
    stakeAmount
    height
    voteWeight
  }
}

Example response:

{
  "data": {
    "VoteByHeight": {
      "height": 20924943,
      "stakeAmount": [
        "495.994311518986506235",
        "51127.627429245086002541"
      ],
      "voteWeight": [
        "631.859744093707405579",
        "60543.734008399268885716"
      ]
    }
  }
}

HTTP Request

POST /api.StakingService.VoteByHeight

VoteByHeightRequest

Field Type Label Description
address string repeated
height uint64

VoteByHeightResponse

Field Type Label Description
height uint64
stakeAmount string repeated
voteWeight string repeated

BucketByID

Get staking bucket details by bucket IDs at a given block height. Set includeSystem to true to also return system staking buckets (v1/v2/v3). All duration values are returned in seconds.

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.BucketByID \
  --header 'Content-Type: application/json' \
  --data '{
    "bucketId": [1, 2],
    "height": 0,
    "includeSystem": false
}'
query {
  BucketByID(
    bucketId: [1, 2]
    height: 0
    includeSystem: false
  ) {
    height
    nativeBuckets {
      bucketId
      ownerAddress
      candidate
      stakedAmount
      votingPower
      duration
      autoStake
      createTime
      stakeStartTime
      unstakeStartTime
      blockHeight
    }
  }
}

Example response:

{
  "height": 37000000,
  "nativeBuckets": [
    {
      "bucketId": "1",
      "ownerAddress": "io1jh0ekmccywfkmj7e8qsuzsupnlk3w5337hjjg",
      "candidate": "io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza",
      "stakedAmount": "1200000000000000000000000",
      "votingPower": "2012011090252587925504000",
      "duration": 7862400,
      "autoStake": true,
      "createTime": 1553591580,
      "stakeStartTime": 1553591580,
      "unstakeStartTime": 0,
      "blockHeight": 36999980
    }
  ]
}

HTTP Request

POST /api.StakingService.BucketByID

BucketByIDRequest

Field Type Label Description
bucketId uint64 repeated list of bucket IDs to query
height uint64 block height (0 = latest indexed height)
includeSystem bool whether to include system buckets in response (default false)

BucketByIDResponse

Field Type Label Description
height uint64 block height of the query
nativeBuckets StakingBucketInfo repeated native staking buckets
systemBuckets StakingBucketInfo repeated system staking buckets v1 (only when includeSystem=true)
systemV2Buckets StakingBucketInfo repeated system staking buckets v2 (only when includeSystem=true)
systemV3Buckets StakingBucketInfo repeated system staking buckets v3 (only when includeSystem=true)

StakingBucketInfo

Field Type Label Description
bucketId uint64 unique bucket ID
ownerAddress string bucket owner IoTeX address
candidate string delegate address receiving the vote
stakedAmount string total staked amount in Rau (decimal string)
votingPower string voting power in Rau (decimal string)
duration uint32 lock duration in seconds
autoStake bool whether auto-stake is enabled
createTime uint32 bucket creation time (unix timestamp)
stakeStartTime uint32 staking start time (unix timestamp)
unstakeStartTime uint32 unstaking start time (unix timestamp, 0 if not unstaking)
blockHeight uint64 block height of this bucket state

CandidateVoteByHeight

CandidateVoteByHeight returns the stake amount and voting weight for candidate addresses at a given block height.

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.CandidateVoteByHeight \
  --header 'Content-Type: application/json' \
  --data '{
  "address": ["io1..."],
  "height": 19000000
}'
query {
  CandidateVoteByHeight(address: ["io1..."], height: 19000000) {
    height
    stakeAmount
    voteWeight
    address
  }
}

Example response:

{
  "data": {
    "CandidateVoteByHeight": {
      "height": 19000000,
      "stakeAmount": ["10000000000000000000000"],
      "voteWeight": ["12000000000000000000000"],
      "address": ["io1..."]
    }
  }
}

HTTP Request

POST /api.StakingService.CandidateVoteByHeight

CandidateVoteByHeightRequest

Field Type Label Description
address string repeated candidate address list
height uint64 block height

CandidateVoteByHeightResponse

Field Type Label Description
height uint64 block height
stakeAmount string repeated stake amount list
voteWeight string repeated vote weight list
address string repeated address list

GetBucketList

GetBucketList returns a paginated list of staking buckets with sorting and interval filters. Supports multiple bucket versions.

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.GetBucketList \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": 20,
  "offset": 0,
  "sort": "timestamp:desc",
  "interval": "7D",
  "version": "native"
}'
query {
  GetBucketList(limit: 20, offset: 0, sort: "timestamp:desc", interval: "7D", version: "native") {
    buckets {
      bucket_id
      owner_address
      candidate
      staked_amount
      duration
      auto_stake
      timestamp
    }
    count
    group_count
  }
}

Example response:

{
  "data": {
    "GetBucketList": {
      "buckets": [
        {
          "bucket_id": 1001,
          "owner_address": "io1...",
          "candidate": "iotexlab",
          "staked_amount": "10000000000000000000000",
          "duration": "91 days",
          "auto_stake": true,
          "timestamp": "2024-01-15T10:00:00Z"
        }
      ],
      "count": 5000,
      "group_count": 5000
    }
  }
}

HTTP Request

POST /api.StakingService.GetBucketList

GetBucketListRequest

Field Type Label Description
limit int64 number of records per page
offset int64 starting offset
sort string sort field and direction (e.g. "timestamp:desc")
interval string time interval filter: "1D", "7D", "30D", "1Y", "ALL"
version string bucket version: "native", "nft_v1", "nft_v2", "nft_v3"

GetBucketListResponse

Field Type Label Description
buckets BucketInfoEx repeated list of buckets
count int64 total number of matching buckets
group_count int64 total group count

BucketInfoEx

Field Type Label Description
bucket_id int64 bucket ID
action_hash string creation action hash
timestamp string creation timestamp
create_time string create time
stake_start_time string stake start time
unstake_start_time string unstake start time
amount string action amount
staked_amount string staked amount
act_type string action type
sender string sender address
owner_address string bucket owner address
candidate string candidate name
auto_stake bool whether auto-stake is enabled
duration string stake duration
gas_price string gas price
gas_limit string gas limit
recipient string recipient address
delegate_name string delegate name

GetBucketsByBucketId

GetBucketsByBucketId returns the history of actions for a specific staking bucket ID.

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.GetBucketsByBucketId \
  --header 'Content-Type: application/json' \
  --data '{
  "bucket_id": 1001,
  "limit": 20,
  "offset": 0,
  "version": "native"
}'
query {
  GetBucketsByBucketId(bucket_id: 1001, limit: 20, offset: 0, version: "native") {
    buckets {
      bucket_id
      act_type
      staked_amount
      timestamp
    }
    count
  }
}

Example response:

{
  "data": {
    "GetBucketsByBucketId": {
      "buckets": [
        {
          "bucket_id": 1001,
          "act_type": "stakeCreate",
          "staked_amount": "10000000000000000000000",
          "timestamp": "2024-01-15T10:00:00Z"
        }
      ],
      "count": 5
    }
  }
}

HTTP Request

POST /api.StakingService.GetBucketsByBucketId

GetBucketsByBucketIdRequest

Field Type Label Description
bucket_id int64 staking bucket ID
limit int64 number of records per page
offset int64 starting offset
version string bucket version: "native", "nft_v1", "nft_v2", "nft_v3"

GetBucketsByBucketIdResponse

Field Type Label Description
buckets BucketInfoEx repeated list of bucket history records
count int64 total number of records

GetBucketByBucketId

GetBucketByBucketId returns the details of a single staking bucket.

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.GetBucketByBucketId \
  --header 'Content-Type: application/json' \
  --data '{
  "bucket_id": 1001,
  "version": "native"
}'
query {
  GetBucketByBucketId(bucket_id: 1001, version: "native") {
    exist
    bucket {
      bucket_id
      owner_address
      candidate
      staked_amount
      duration
      auto_stake
    }
  }
}

Example response:

{
  "data": {
    "GetBucketByBucketId": {
      "exist": true,
      "bucket": {
        "bucket_id": 1001,
        "owner_address": "io1...",
        "candidate": "iotexlab",
        "staked_amount": "10000000000000000000000",
        "duration": "91 days",
        "auto_stake": true
      }
    }
  }
}

HTTP Request

POST /api.StakingService.GetBucketByBucketId

GetBucketByBucketIdRequest

Field Type Label Description
bucket_id int64 staking bucket ID
version string bucket version: "native", "nft_v1", "nft_v2", "nft_v3"

GetBucketByBucketIdResponse

Field Type Label Description
exist bool whether the bucket exists
bucket BucketInfoEx bucket details

GetNativeBuckets

GetNativeBuckets returns a paginated list of native staking buckets.

curl --request POST \
  --url https://analyser-api.iotex.io/api.StakingService.GetNativeBuckets \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": 20,
  "offset": 0
}'
query {
  GetNativeBuckets(limit: 20, offset: 0) {
    buckets {
      bucket_id
      owner_address
      candidate
      staked_amount
      duration
      auto_stake
    }
    count
  }
}

Example response:

{
  "data": {
    "GetNativeBuckets": {
      "buckets": [
        {
          "bucket_id": 1001,
          "owner_address": "io1...",
          "candidate": "iotexlab",
          "staked_amount": "10000000000000000000000",
          "duration": "91 days",
          "auto_stake": true
        }
      ],
      "count": 50000
    }
  }
}

HTTP Request

POST /api.StakingService.GetNativeBuckets

GetNativeBucketsRequest

Field Type Label Description
limit int64 number of records per page
offset int64 starting offset

GetNativeBucketsResponse

Field Type Label Description
buckets BucketInfoEx repeated list of native buckets
count int64 total number of native buckets

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

GetXRC20TransfersByContract

GetXRC20TransfersByContract returns ERC20 transfers for a given contract, with optional sender/recipient filter.

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.GetXRC20TransfersByContract \
  --header 'Content-Type: application/json' \
  --data '{
  "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
  "pagination": { "skip": 0, "first": 20 }
}'

Example response:

{
  "exist": true,
  "count": 1000,
  "transfers": [
    {
      "id": 1,
      "block_height": 19000000,
      "action_hash": "abc123...",
      "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
      "amount": "1000000000000000000",
      "sender": "io1...",
      "recipient": "io1...",
      "timestamp": "2024-01-15T10:00:00Z"
    }
  ]
}

HTTP Request

POST /api.XRC20Service.GetXRC20TransfersByContract

GetXRC20TransfersByContractRequest

Field Type Label Description
contract_address string ERC20 contract address
address string optional: filter by sender or recipient address
pagination pagination.Pagination pagination info

GetXRC20TransfersByContractResponse

Field Type Label Description
exist bool whether transfers exist
count int64 total number of transfers
transfers XRC20TransferInfo repeated list of transfers

XRC20TransferInfo

Field Type Label Description
id uint64 record id
block_height uint64 block height
action_hash string action hash
contract_address string token contract address
amount string transfer amount
sender string sender address
recipient string recipient address
timestamp string timestamp

GetXRC20HoldersByContract

GetXRC20HoldersByContract returns all holders of a given ERC20 token with their balances.

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.GetXRC20HoldersByContract \
  --header 'Content-Type: application/json' \
  --data '{
  "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
  "pagination": { "skip": 0, "first": 20 }
}'

Example response:

{
  "count": 5000,
  "holders": [
    {
      "address": "io1...",
      "balance": "1000000000000000000"
    }
  ]
}

HTTP Request

POST /api.XRC20Service.GetXRC20HoldersByContract

GetXRC20HoldersByContractRequest

Field Type Label Description
contract_address string ERC20 contract address
pagination pagination.Pagination pagination info

GetXRC20HoldersByContractResponse

Field Type Label Description
count int64 total number of holders
holders XRC20HolderInfo repeated list of holders with balances

XRC20HolderInfo

Field Type Label Description
address string holder address
balance string token balance

GetXRC20TokenBalance

GetXRC20TokenBalance returns the ERC20 token balance for a specific address and contract.

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC20Service.GetXRC20TokenBalance \
  --header 'Content-Type: application/json' \
  --data '{
  "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
  "address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
}'

Example response:

{
  "balance": "1000000000000000000"
}

HTTP Request

POST /api.XRC20Service.GetXRC20TokenBalance

GetXRC20TokenBalanceRequest

Field Type Label Description
contract_address string ERC20 contract address
address string holder address

GetXRC20TokenBalanceResponse

Field Type Label Description
balance string token balance (raw units)

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

GetNFTTransferList

GetNFTTransferList returns NFT transfers (XRC721 + XRC1155) with optional contract and address filters.

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.GetNFTTransferList \
  --header 'Content-Type: application/json' \
  --data '{
  "pagination": { "skip": 0, "first": 20 },
  "contract_address": "io1nft..."
}'

Example response:

{
  "exist": true,
  "count": 10000,
  "transfers": [
    {
      "id": 1,
      "type": "xrc721",
      "block_height": 19000000,
      "action_hash": "abc123...",
      "contract_address": "io1nft...",
      "token_id": "42",
      "value": "1",
      "sender": "io1...",
      "recipient": "io1...",
      "timestamp": "2024-01-15T10:00:00Z"
    }
  ]
}

HTTP Request

POST /api.XRC721Service.GetNFTTransferList

GetNFTTransferListRequest

Field Type Label Description
pagination pagination.Pagination pagination info
contract_address string optional: filter by contract address
address string optional: filter by sender, recipient, or token ID

GetNFTTransferListResponse

Field Type Label Description
exist bool whether transfers exist
count int64 total number of transfers
transfers NFTTransferInfo repeated list of NFT transfers

NFTTransferInfo

Field Type Label Description
id uint64 record id
type string token standard: "xrc721" or "xrc1155"
block_height uint64 block height
action_hash string action hash
contract_address string NFT contract address
token_id string token ID
value string transfer value (amount for xrc1155)
sender string sender address
recipient string recipient address
timestamp string timestamp

GetNFTHoldersByContract

GetNFTHoldersByContract returns NFT holders for a given contract with their balances.

curl --request POST \
  --url https://analyser-api.iotex.io/api.XRC721Service.GetNFTHoldersByContract \
  --header 'Content-Type: application/json' \
  --data '{
  "contract_address": "io1nft...",
  "pagination": { "skip": 0, "first": 20 }
}'

Example response:

{
  "count": 500,
  "holders": [
    {
      "address": "io1...",
      "balance": "3"
    }
  ]
}

HTTP Request

POST /api.XRC721Service.GetNFTHoldersByContract

GetNFTHoldersByContractRequest

Field Type Label Description
contract_address string NFT contract address
pagination pagination.Pagination pagination info

GetNFTHoldersByContractResponse

Field Type Label Description
count int64 total number of holders
holders NFTHolderInfo repeated list of holders

NFTHolderInfo

Field Type Label Description
address string holder address
balance string number of NFTs held

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

HermesBucket

HermesBucket returns bucket-level reward distributions for Hermes delegates, showing per-bucket breakdown.

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.HermesBucket \
  --header 'Content-Type: application/json' \
  --data '{
  "startEpoch": 20000,
  "epochCount": 24,
  "rewardAddress": ["io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85"]
}'
query {
  HermesBucket(
    startEpoch: 20000
    epochCount: 24
    rewardAddress: ["io12mgttmfa2ffn9uqvn0yn37f4nz43d248l2ga85"]
  ) {
    hermesBucketDistribution {
      delegateName
      stakingIotexAddress
      voterCount
      waiveServiceFee
      refund
      bucketRewardDistribution {
        voterEthAddress
        voterIotexAddress
        bucketID
        amount
      }
    }
  }
}

Example response:

{
  "data": {
    "HermesBucket": {
      "hermesBucketDistribution": [
        {
          "delegateName": "iotexlab",
          "stakingIotexAddress": "io1...",
          "voterCount": 150,
          "waiveServiceFee": true,
          "refund": "0",
          "bucketRewardDistribution": [
            {
              "voterEthAddress": "0x...",
              "voterIotexAddress": "io1...",
              "bucketID": 1001,
              "amount": "1000000000000000000"
            }
          ]
        }
      ]
    }
  }
}

HTTP Request

POST /api.HermesService.HermesBucket

HermesBucketResponse

Field Type Label Description
hermesBucketDistribution HermesBucketDistribution repeated list of bucket reward distributions by delegate

HermesBucketDistribution

Field Type Label Description
delegateName string delegate name
bucketRewardDistribution BucketRewardDistribution repeated list of per-bucket reward distributions
stakingIotexAddress string delegate IoTeX staking address
voterCount uint64 number of voters
waiveServiceFee bool whether the delegate waives the service fee
refund string refund amount

BucketRewardDistribution

Field Type Label Description
voterEthAddress string voter's ERC20 address
voterIotexAddress string voter's IoTeX address
bucketID uint64 staking bucket ID
amount string reward amount

HermesDropRecords

HermesDropRecords inserts Hermes drop records for a delegate and epoch.

curl --request POST \
  --url https://analyser-api.iotex.io/api.HermesService.HermesDropRecords \
  --header 'Content-Type: application/json' \
  --data '{
  "epochNumber": 28884,
  "delegateName": "iotexlab",
  "voterAddress": "io1...",
  "actHash": "abc123...",
  "bucketID": 1001,
  "amount": "1000000000000000000"
}'

Example response:

{
  "success": true
}

HTTP Request

POST /api.HermesService.HermesDropRecords

HermesDropRecordsRequest

Field Type Label Description
epochNumber uint64 end epoch number
delegateName string delegate name
voterAddress string voter address
actHash string action hash
bucketID uint64 bucket ID
amount string reward amount

HermesDropRecordsResponse

Field Type Label Description
success bool whether drop records were successfully inserted

Approval Service API

GetXRC20Approvals

GetXRC20Approvals returns the ERC20 token approvals made by a given owner address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ApprovalService.GetXRC20Approvals \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
}'
query {
  GetXRC20Approvals(owner_address: "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4") {
    approvals {
      action_hash
      contract_address
      owner
      spender
      amount
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "GetXRC20Approvals": {
      "approvals": [
        {
          "action_hash": "abc123...",
          "contract_address": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
          "owner": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
          "spender": "io1...",
          "amount": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
          "timestamp": "2024-01-15T10:00:00Z"
        }
      ]
    }
  }
}

HTTP Request

POST /api.ApprovalService.GetXRC20Approvals

GetXRC20ApprovalsRequest

Field Type Label Description
owner_address string owner address

GetXRC20ApprovalsResponse

Field Type Label Description
approvals XRC20ApprovalInfo repeated list of ERC20 approvals

XRC20ApprovalInfo

Field Type Label Description
action_hash string approval action hash
contract_address string ERC20 contract address
owner string token owner address
spender string approved spender address
amount string approved amount
timestamp string approval timestamp

GetXRC721Approvals

GetXRC721Approvals returns the NFT approvals made by a given owner address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ApprovalService.GetXRC721Approvals \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4"
}'
query {
  GetXRC721Approvals(owner_address: "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4") {
    approvals {
      action_hash
      contract_address
      owner
      approved
      token_id
      timestamp
    }
  }
}

Example response:

{
  "data": {
    "GetXRC721Approvals": {
      "approvals": [
        {
          "action_hash": "abc123...",
          "contract_address": "io1nft...",
          "owner": "io1x58dug5237g40hrtme7qx4nva9x98ehk4wchz4",
          "approved": "io1...",
          "token_id": "42",
          "timestamp": "2024-01-15T10:00:00Z"
        }
      ]
    }
  }
}

HTTP Request

POST /api.ApprovalService.GetXRC721Approvals

GetXRC721ApprovalsRequest

Field Type Label Description
owner_address string owner address

GetXRC721ApprovalsResponse

Field Type Label Description
approvals XRC721ApprovalInfo repeated list of NFT approvals

XRC721ApprovalInfo

Field Type Label Description
action_hash string approval action hash
contract_address string NFT contract address
owner string token owner address
approved string approved operator address
token_id string token ID
timestamp string approval timestamp

Actions Service API

GetEvmTransferDetailListByAddress

GetEvmTransferDetailListByAddress returns a paginated list of EVM transfer details for an address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionsService.GetEvmTransferDetailListByAddress \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io14u5d66rt465ykm7t2847qllj0reml27q30kr75",
  "offset": 0,
  "size": 10
}'
query {
  GetEvmTransferDetailListByAddress(
    address: "io14u5d66rt465ykm7t2847qllj0reml27q30kr75"
    offset: 0
    size: 10
  ) {
    count
    results {
      actHash
      blkHeight
      sender
      recipient
      blkHash
      amount
      timeStamp
    }
  }
}

Example response:

{
  "data": {
    "GetEvmTransferDetailListByAddress": {
      "count": 250,
      "results": [
        {
          "actHash": "abc123...",
          "blkHeight": 19000000,
          "sender": "io1...",
          "recipient": "io1...",
          "blkHash": "def456...",
          "amount": "1000000000000000000",
          "timeStamp": 1714000000
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionsService.GetEvmTransferDetailListByAddress

ActionsRequest

Field Type Label Description
address string wallet address
height uint64 optional: filter by block height
offset uint64 starting offset
size uint64 number of records to return
sort string sort direction (e.g. "desc")

EvmTransferDetailListByAddressResponse

Field Type Label Description
count uint64 total number of EVM transfers
results EvmTransferDetailResult repeated list of EVM transfers

EvmTransferDetailResult

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

GetAllActionsByAddress

GetAllActionsByAddress returns a combined paginated list of all action types (native, XRC20, XRC721, EVM transfer) for an address.

curl --request POST \
  --url https://analyser-api.iotex.io/api.ActionsService.GetAllActionsByAddress \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "io14u5d66rt465ykm7t2847qllj0reml27q30kr75",
  "offset": 0,
  "size": 10,
  "sort": "desc"
}'
query {
  GetAllActionsByAddress(
    address: "io14u5d66rt465ykm7t2847qllj0reml27q30kr75"
    offset: 0
    size: 10
    sort: "desc"
  ) {
    count
    results {
      actHash
      blkHeight
      sender
      recipient
      actType
      amount
      timeStamp
      recordType
    }
  }
}

Example response:

{
  "data": {
    "GetAllActionsByAddress": {
      "count": 5000,
      "results": [
        {
          "actHash": "abc123...",
          "blkHeight": 19000000,
          "sender": "io1...",
          "recipient": "io1...",
          "actType": "transfer",
          "amount": "1000000000000000000",
          "timeStamp": 1714000000,
          "recordType": 0
        }
      ]
    }
  }
}

HTTP Request

POST /api.ActionsService.GetAllActionsByAddress

AllActionsByAddressResponse

Field Type Label Description
count uint64 total number of actions
results AllActionsByAddressResult repeated list of all actions

AllActionsByAddressResult

Field Type Label Description
actHash string action hash
blkHeight uint64 block height
sender string sender address
recipient string recipient address
actType string action type
amount string amount
timeStamp uint64 unix timestamp
recordType AllActionsByAddressResult.RecordType record type: NATIVE(0), XRC20(1), XRC721(2), EVMTRANSFER(3)