Analytics - GraphQL API
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.

Delegate

Bookkeeping

1
Usage:
2
Bookkeeping gives delegates an overview of the reward distributions to their voters within a range of epochs
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
delegateName: delegate name
8
percentage: percentage of reward distribution
9
includeFoundationBonus: whether include foundation bonus as part of the reward distribution
10
pagination:
11
skip: starting index of displaying reward distribution list
12
first: number of reward distributions to display
13
​
14
Response:
15
exist: whether the delegate has bookkeeping information within the specified epoch range
16
rewardDistribution:
17
voterEthAddress: voter’s ERC20 address
18
voterIotexAddress: voter’s IoTeX address
19
amount: amount of reward distribution
20
count: total number of reward distributions
Copied!

Productivity

1
Usage:
2
Productivity gives block productivity of producers within a range of epochs
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
delegateName: producer name
8
​
9
Response:
10
exist: whether the delegate has productivity information within the specified epoch range
11
production: number of block productions
12
expectedProduction: number of expected block productions
Copied!

Reward

1
Usage:
2
Rewards provides reward detail information for candidates within a range of epochs
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
delegateName: candidate name
8
​
9
Response:
10
exist: whether the delegate has reward information within the specified epoch range
11
blockReward: amount of block rewards
12
epochReward: amount of epoch rewards
13
foundationBonus: amount of foundation bonus
Copied!

BucketInfo

1
Usage:
2
BucketInfo provides voting bucket detail information for candidates within a range of epochs
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
delegateName: candidate name
8
​
9
Response:
10
exist: whether the delegate has voting bucket information within the specified epoch range
11
bucketInfoList:
12
epochNumber: epoch number
13
bucketInfo:
14
voterIotexAddress: voter's IoTeX address
15
voterEthAddress: voter’s ERC20 address
16
isNative: whether the bucket is native
17
votes: voter's votes
18
weightedVotes: voter’s weighted votes
19
startTime: bucket start time
20
remainingDuration: bucket remaining duration
21
decay: whether the vote weight decays
22
pagination:
23
skip: starting index of displaying bucket list
24
first: number of buckets to display
25
count: total number of buckets in the given epoch for the given delegate
Copied!

Staking

1
Usage:
2
Staking provides staking information for candidates within a range of epochs
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
delegateName: candidate name
8
​
9
Response:
10
exist: whether the delegate has staking information within the specified epoch range
11
stakingInfo:
12
epochNumber: epoch number
13
selfStaking: candidate’s self-staking amount
14
totalStaking: total staking amount
Copied!

ProbationHistoricalRate

1
Usage:
2
ProbationHistoricalRate provides the rate of probation for a given delegate
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
delegateName: candidate name
8
​
9
Response:
10
probationHistoricalRate: probation historical rate
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
delegate(startEpoch: 1500, epochCount: 2, delegateName: "blackpool"){
5
bookkeeping(percentage: 90, includeFoundationBonus: true){
6
exist
7
rewardDistribution(pagination: {skip: 0, first: 2}){
8
voterEthAddress
9
amount
10
}
11
count
12
}
13
reward{
14
exist
15
blockReward
16
epochReward
17
foundationBonus
18
}
19
productivity{
20
exist
21
production
22
expectedProduction
23
}
24
bucketInfo{
25
exist
26
bucketInfoList{
27
epochNumber
28
bucketInfo{
29
voterEthAddress
30
weightedVotes
31
}
32
count
33
}
34
}
35
staking{
36
exist
37
stakingInfo{
38
epochNumber
39
selfStaking
40
totalStaking
41
}
42
}
43
probationHistoricalRate
44
}
45
}
46
​
47
Sample Response:
48
​
49
{
50
"data": {
51
"delegate": {
52
"bookkeeping": {
53
"exist": true,
54
"rewardDistribution": [
55
{
56
"voterEthAddress": "0x2ed3767cfcbceb42ff5f3642d4df6f851b947073",
57
"amount": "249296733398649281"
58
},
59
{
60
"voterEthAddress": "0x6729cdc9172b00ac69f4ce3f98de2eb4d0686925",
61
"amount": "5264917870144216244"
62
}
63
],
64
"count": 4
65
},
66
"reward": {
67
"exist": true,
68
"blockReward": "0",
69
"epochReward": "329819772195117893866",
70
"foundationBonus": "160000000000000000000"
71
},
72
"productivity": {
73
"exist": false,
74
"production": "",
75
"expectedProduction": ""
76
},
77
"bucketInfo": {
78
"exist": true,
79
"bucketInfoList": [
80
{
81
"epochNumber": 1500,
82
"bucketInfo": [
83
{
84
"voterEthAddress": "2ed3767cfcbceb42ff5f3642d4df6f851b947073",
85
"weightedVotes": "12050042619210072913916"
86
},
87
{
88
"voterEthAddress": "6729cdc9172b00ac69f4ce3f98de2eb4d0686925",
89
"weightedVotes": "254485824410815439561517"
90
},
91
{
92
"voterEthAddress": "d8e70e5029e5353e8d360365d5273ed329cc4918",
93
"weightedVotes": "3203226341724952466266885"
94
},
95
{
96
"voterEthAddress": "d8e70e5029e5353e8d360365d5273ed329cc4918",
97
"weightedVotes": "2838636602552620757933254"
98
},
99
{
100
"voterEthAddress": "fe7bcb3676aabe9a6b39cb23f3a5fa41eed7ad1b",
101
"weightedVotes": "15000000000000000000000000"
102
}
103
],
104
"count": 5
105
},
106
{
107
"epochNumber": 1501,
108
"bucketInfo": [
109
{
110
"voterEthAddress": "2ed3767cfcbceb42ff5f3642d4df6f851b947073",
111
"weightedVotes": "12050042619210072913916"
112
},
113
{
114
"voterEthAddress": "6729cdc9172b00ac69f4ce3f98de2eb4d0686925",
115
"weightedVotes": "254485824410815439561517"
116
},
117
{
118
"voterEthAddress": "d8e70e5029e5353e8d360365d5273ed329cc4918",
119
"weightedVotes": "3203226341724952466266885"
120
},
121
{
122
"voterEthAddress": "d8e70e5029e5353e8d360365d5273ed329cc4918",
123
"weightedVotes": "2838636602552620757933254"
124
},
125
{
126
"voterEthAddress": "fe7bcb3676aabe9a6b39cb23f3a5fa41eed7ad1b",
127
"weightedVotes": "15000000000000000000000000"
128
}
129
],
130
"count": 5
131
}
132
]
133
},
134
"staking": {
135
"exist": true,
136
"stakingInfo": [
137
{
138
"epochNumber": 1500,
139
"selfStaking": "5039748000000000000000000",
140
"totalStaking": "21308398811307598736675572"
141
},
142
{
143
"epochNumber": 1501,
144
"selfStaking": "5039748000000000000000000",
145
"totalStaking": "21308398811307598736675572"
146
}
147
]
148
}
149
"probationHistoricalRate": "0.00"
150
}
151
}
152
}
Copied!

Chain

MostRecentEpoch

1
Usage:
2
MostRecentEpoch gives the latest epoch number
3
​
4
Request:
5
N/A
6
​
7
Response:
8
mostRecentEpoch: latest epoch number
Copied!

MostRecentBlockHeight

1
Usage:
2
MostRecentBlockHeight gives the latest block height
3
​
4
Request:
5
N/A
6
​
7
Response:
8
mostRecentBlockHeight: latest block height
Copied!

MostRecentTPS

1
Usage:
2
MostRecentTPS gives the latest transactions per second
3
​
4
Request:
5
blockWindow: number of last blocks that are backtracked to compute TPS
6
​
7
Response:
8
mostRecentTPS: latest transactions per second
Copied!

NumberOfActions

1
Usage:
2
NumberOfActions gives the number of actions
3
​
4
Request:
5
pagination:
6
startEpoch: starting epoch number
7
epochCount: epoch count
8
​
9
Response:
10
exist: whether the starting epoch number is less than the most recent epoch number
11
count: number of actions
Copied!

VotingResultMeta

1
Usage:
2
VotingResultMeta gives the latest metadata of voting result
3
​
4
Request:
5
N/A
6
​
7
Response:
8
totalCandidates: total number of candidates
9
totalWeightedVotes: total weighted votes
10
votedTokens: total voted tokens
Copied!

TotalTransferredTokens

1
Usage:
2
TotalTransferredTokens gives the amount of tokens transferred within a time frame
3
​
4
Request:
5
pagination:
6
startEpoch: starting epoch number
7
epochCount: epoch count
8
​
9
Response:
10
totalTransferredTokens: total tranferred tokens
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
chain{
5
mostRecentEpoch
6
mostRecentBlockHeight
7
mostRecentTPS(blockWindow: 10)
8
numberOfActions(pagination: {startEpoch: 1, epochCount: 10}){
9
exist
10
count
11
}
12
totalTransferredTokens(pagination:{startEpoch: 1, epochCount: 10})
13
}
14
}
15
​
16
Sample Response:
17
​
18
{
19
"data": {
20
"chain": {
21
"mostRecentEpoch": 1383,
22
"mostRecentBlockHeight": 497772,
23
"mostRecentTPS": 0,
24
"numberOfActions": {
25
"exist": true,
26
"count": 3622
27
}
28
"totalTransferredTokens": "10000010000000000000000"
29
}
30
}
31
}
Copied!

Voting

VotingMeta

1
Usage:
2
VotingMeta provides metadata of voting results
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
​
8
Reponse:
9
exist: whether the starting epoch number is less than the most recent epoch number
10
candidateMeta:
11
epochNumber: epoch number
12
consensusDelegates: number of consensus delegates in the epoch
13
totalCandidates: number of total delegates in the epoch
14
totalWeightedVotes: candidate total weighted votes in the epoch
15
votedTokens: total voted tokens in the epoch
Copied!

CandidateInfo

1
Usage:
2
CandidateInfo provides candidate information
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
​
8
Reponse:
9
candidateMeta:
10
epochNumber: epoch number
11
candidates:
12
name: candidate name
13
address: canddiate address
14
totalWeightedVotes: total weighted votes
15
selfStakingTokens: candidate self-staking tokens
16
operatorAddress: candidate operator address
17
rewardAddress: candidate reward address
Copied!

RewardSources

1
Usage:
2
RewardSources provides reward sources for voters
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
voterIotxAddress: voter IoTeX address
8
​
9
Reponse:
10
exist: whether the voter has reward information within the specified epoch range
11
delegateDistributions:
12
delegateName: delegate name
13
amount: amount of reward distribution
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
voting(startEpoch: 1, epochCount: 3){
5
exist
6
candidateMeta{
7
epochNumber
8
consensusDelegates
9
totalCandidates
10
totalWeightedVotes
11
votedTokens
12
}
13
}
14
}
15
​
16
Sample Response:
17
​
18
{
19
"data": {
20
"voting": {
21
"exist": true,
22
"candidateMeta": [
23
{
24
"epochNumber": 1,
25
"consensusDelegates": 36,
26
"totalCandidates": 87,
27
"totalWeightedVotes": "907521920724956720472322956",
28
"votedTokens": "776946421831717811810000000"
29
},
30
{
31
"epochNumber": 2,
32
"consensusDelegates": 36,
33
"totalCandidates": 87,
34
"totalWeightedVotes": "907524412616270399722024013",
35
"votedTokens": "776948876231717811810000000"
36
},
37
{
38
"epochNumber": 3,
39
"consensusDelegates": 36,
40
"totalCandidates": 87,
41
"totalWeightedVotes": "907486769208330536874270055",
42
"votedTokens": "776953490231717811810000000"
43
}
44
]
45
}
46
}
47
}
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
voting(startEpoch: 9760, epochCount: 1){
5
votingMeta{
6
candidateMeta{
7
votedTokens
8
totalWeightedVotes
9
}
10
}
11
}
12
}
13
​
14
Sample Response:
15
​
16
{
17
"data": {
18
"voting": {
19
"votingMeta": {
20
"candidateMeta": [
21
{
22
"votedTokens": "2238183641136247164314750007",
23
"totalWeightedVotes": "2540055496482100272999904251"
24
}
25
]
26
}
27
}
28
}
29
}
Copied!

Account

ActiveAccounts

1
Usage:
2
ActiveAccounts lists most recently active accounts
3
​
4
Request:
5
count: number of account addresses to be queried for active accounts
6
​
7
Response:
8
activeAccounts: list of account addresses
Copied!

OperatorAddress

1
Usage:
2
OperatorAddress finds the delegate's operator address given the delegate's alias name
3
​
4
Request:
5
aliasName: delegate's alias name
6
​
7
Response:
8
exist: whether the alias name exists
9
operatorAddress: operator address associated with the given alias name
Copied!

Alias

1
Usage:
2
Alias finds the delegate's alias name given the delegate's operator address
3
​
4
Request:
5
operatorAddress: delegate's operator address
6
​
7
Response:
8
exist: whether the operator address exists
9
aliasName: alias name associated with the given operator address
Copied!

TotalNumberOfHolders

1
Usage:
2
TotalNumberOfHolders returns total number of IOTX holders so far
3
Request:
4
N/A
5
Response:
6
totalNumberOfHolders: total number of IOTX holders so far
Copied!

TotalAccountSupply

1
Usage:
2
TotalAccountSupply returns total amount of tokens held by IoTeX accounts
3
Request:
4
N/A
5
Response:
6
totalAccountSupply: total amount of tokens held by IoTeX accounts
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
account{
5
activeAccounts(count: 5)
6
operatorAddress(aliasName: "gamefantasy#"){
7
exist
8
operatorAddress
9
}
10
alias(operatorAddress: "io1456knehzn9qup8unxlf4q06empz8lqxtp6v5vh"){
11
exist
12
aliasName
13
}
14
totalNumberOfHolders
15
totalAccountSupply
16
}
17
}
18
​
19
Sample Response:
20
​
21
{
22
"data": {
23
"account": {
24
"activeAccounts": [
25
"io17cmrextyfeu4gddwd89g5qncedsnc553dhz7xa",
26
"io10reczcaelglh5xmkay65h9vw3e5dp82e8vw0rz",
27
"io13xdhg9du56khumz3sg6a3ma5q5kjx7vdlx48x8",
28
"io1tf7tu2xt6mpk8s70ahugsx20jqgu9eg6v48qlk",
29
"io1xj0u5n20tsqwxh5a3xdtmzuz9wasft0pqjrq8t"
30
],
31
"operatorAddress": {
32
"exist": true,
33
"operatorAddress": "io1qnec80ark9shjc6uzk45dhm8s50dpc27sjuver"
34
},
35
"alias": {
36
"exist": true,
37
"aliasName": "pubxpayments"
38
},
39
"totalNumberOfHolders": 9006,
40
"totalAccountSupply": "782833468919740605141266758"
41
}
42
}
43
}
Copied!

Action

ByDates

1
Usage:
2
ByDates finds actions by dates
3
​
4
Request:
5
startDate: start date in unix epoch time
6
endDate: end date in unix epoch time
7
pagination:
8
skip: starting index of displaying action list
9
first: number of actions to display
10
​
11
Response:
12
exist: whether actions exist within the time frame
13
actions:
14
actHash: action hash
15
blkHash: block hash
16
timeStamp: timestamp
17
actType: action type
18
sender: sender address
19
recipient: recipient address
20
amount: amount transferred
21
gasFee: gas fee
22
count: total number of actions within the time frame
Copied!

ByHash

1
Usage:
2
ByHash finds the action by hash
3
​
4
Request:
5
actHash: action hash
6
​
7
Response:
8
actionInfo:
9
actHash: action hash
10
blkHash: block hash
11
timeStamp: timestamp
12
actType: action type
13
sender: sender address
14
recipient: recipient address
15
amount: amount transferred
16
gasFee: gas fee
17
evmTransfers:
18
from: sender address
19
to: recipient address
20
quantity: amount transferred
Copied!

ByAddress

1
Usage:
2
ByAddress finds actions by address
3
​
4
Request:
5
address: sender address or recipient address
6
pagination:
7
skip: starting index of displaying action list
8
first: number of actions to display
9
​
10
Response:
11
exist: whether actions exist for the given address
12
actions:
13
actHash: action hash
14
blkHash: block hash
15
timeStamp: timestamp
16
actType: action type
17
sender: sender address
18
recipient: recipient address
19
amount: amount transferred
20
gasFee: gas fee
21
count: total number of actions for the given address
Copied!

EvmTransfersByAddress

1
Usage:
2
EvmTransfersByAddress finds EVM transfers by address
3
​
4
Request:
5
address: sender address or recipient address
6
pagination:
7
skip: starting index of displaying action list
8
first: number of actions to display
9
​
10
Response:
11
exist: whether EVM transfers exist for the given address
12
evmTransfers:
13
from: sender address
14
to: recipient address
15
quantity: amount transferred
16
actHash: action hash
17
blkHash: block hash
18
timeStamp: timestamp
19
count: total number of EVM transfers for the given address
Copied!

ByType

1
Usage:
2
ByType finds actions by action type
3
​
4
Request:
5
type: action type
6
pagination:
7
skip: starting index of displaying action list
8
first: number of actions to display
9
​
10
Response:
11
exist: whether actions exist for the given type
12
actions:
13
actHash: action hash
14
blkHash: block hash
15
timeStamp: timestamp
16
actType: action type
17
sender: sender address
18
recipient: recipient address
19
amount: amount transferred
20
gasFee: gas fee
21
count: total number of actions for the given type
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
action{
5
byDates(startDate: 1589485984, endDate: 1589486028) {
6
exist
7
actions(pagination: {skip: 0, first: 1}){
8
actHash
9
blkHash
10
timeStamp
11
actType
12
sender
13
recipient
14
amount
15
gasFee
16
}
17
count
18
}
19
byHash(actHash: "000086e6e3034c104025896f8af9d3e313b95957c076b3a5ebe1f42f8af3a8ad"){
20
actionInfo{
21
actHash
22
blkHash
23
timeStamp
24
actType
25
sender
26
recipient
27
amount
28
gasFee
29
}
30
evmTransfers{
31
from
32
to
33
quantity
34
}
35
}
36
byAddress(address:"io17jz7vtvllrgctkrvzmmue55feuk8cy6mtcynkk"){
37
exist
38
actions(pagination: {skip: 0, first: 1}){
39
actHash
40
blkHash
41
timeStamp
42
actType
43
sender
44
recipient
45
amount
46
gasFee
47
}
48
count
49
}
50
evmTransfersByAddress(address: "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a"){
51
exist
52
evmTransfers{
53
from
54
to
55
quantity
56
actHash
57
blkHash
58
timeStamp
59
}
60
count
61
}
62
byType(type:"transfer"){
63
exist
64
actions(pagination: {skip: 0, first: 1}){
65
actHash
66
blkHash
67
timeStamp
68
actType
69
sender
70
recipient
71
amount
72
gasFee
73
}
74
count
75
}
76
}
77
}
78
​
79
Sample Response:
80
​
81
{
82
"data": {
83
"action": {
84
"byDates": {
85
"exist": true,
86
"actions": [
87
{
88
"actHash": "8c917d11bff3856d60d274c666188afc3aac0fbcddb60bd19cf9a352cb7b00a3",
89
"blkHash": "293845611de09b944c5def5a6b29e83cd4b8d2a00a29575e4720fc64e8adf7b4",
90
"timeStamp": 1589486025,
91
"actType": "grantReward",
92
"sender": "io195mh6ftwz5vnagw984fj4hj8awty3ue2gh457f",
93
"recipient": "",
94
"amount": "0",
95
"gasFee": "0"
96
}
97
],
98
"count": 9
99
},
100
"byHash": {
101
"actionInfo": {
102
"actHash": "000086e6e3034c104025896f8af9d3e313b95957c076b3a5ebe1f42f8af3a8ad",
103
"blkHash": "2f31b5b15c50dc9431cd1f655fdace2c2c7bf92111a4a01a9947ce3969352d00",
104
"timeStamp": 1582409835,
105
"actType": "transfer",
106
"sender": "io1ey8s7p7kzu9lh68we7mstmyllaxc6tgwuj2whh",
107
"recipient": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
108
"amount": "1528012374156719350",
109
"gasFee": "10000000000000000"
110
},
111
"evmTransfers": []
112
},
113
"byAddress": {
114
"exist": true,
115
"actions": [
116
{
117
"actHash": "e1e3d46844046710d4843b2b044f8ff5da785931e808ac071ff4b4280a05aa9e",
118
"blkHash": "3b1dcebd95f35a682ea8f443ae817b240b447e50a23c3a60918c3318bb249ccc",
119
"timeStamp": 1589442290,
120
"actType": "execution",
121
"sender": "io17jz7vtvllrgctkrvzmmue55feuk8cy6mtcynkk",
122
"recipient": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
123
"amount": "0",
124
"gasFee": "60357000000000000"
125
}
126
],
127
"count": 290
128
},
129
"evmTransfersByAddress": {
130
"exist": true,
131
"evmTransfers": [
132
{
133
"from": "io1zn9mn4v63jg3047ylqx9nqaqz0ev659777q3xc",
134
"to": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
135
"quantity": "5006000000000000000000",
136
"actHash": "8f4c40742081668eaab315701f5603dc83ecc455cacffb3b13710c37915cb4dc",
137
"blkHash": "3625674",
138
"timeStamp": 1583322240
139
},
140
{
141
"from": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
142
"to": "io1zn9mn4v63jg3047ylqx9nqaqz0ev659777q3xc",
143
"quantity": "0",
144
"actHash": "8f4c40742081668eaab315701f5603dc83ecc455cacffb3b13710c37915cb4dc",
145
"blkHash": "3625674",
146
"timeStamp": 1583322240
147
},
148
{
149
"from": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
150
"to": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
151
"quantity": "0",
152
"actHash": "c4bd25240b0d8832b0dca2916d30e3c6882a5dbfa803573950ad8ae894ef8f5c",
153
"blkHash": "3572472",
154
"timeStamp": 1583055260
155
},
156
{
157
"from": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
158
"to": "io1zn9mn4v63jg3047ylqx9nqaqz0ev659777q3xc",
159
"quantity": "0",
160
"actHash": "078c9d6c2f18681d9d3747d967919a7fafb44598a39117b9a1a1abc8e18e6013",
161
"blkHash": "3572471",
162
"timeStamp": 1583055255
163
},
164
{
165
"from": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
166
"to": "io1zn9mn4v63jg3047ylqx9nqaqz0ev659777q3xc",
167
"quantity": "5006000000000000000000",
168
"actHash": "fee1360940bb6724636c0731edde984a62941df2e1785361749a50bee6f22559",
169
"blkHash": "3316376",
170
"timeStamp": 1581770210
171
}
172
],
173
"count": 5
174
},
175
"byType": {
176
"exist": true,
177
"actions": [
178
{
179
"actHash": "000086e6e3034c104025896f8af9d3e313b95957c076b3a5ebe1f42f8af3a8ad",
180
"blkHash": "2f31b5b15c50dc9431cd1f655fdace2c2c7bf92111a4a01a9947ce3969352d00",
181
"timeStamp": 1582409835,
182
"actType": "transfer",
183
"sender": "io1ey8s7p7kzu9lh68we7mstmyllaxc6tgwuj2whh",
184
"recipient": "io1nkuv5ns3pevh7r7cwv6lwa2744utyhq7txay3a",
185
"amount": "1528012374156719350",
186
"gasFee": "10000000000000000"
187
}
188
],
189
"count": 132221
190
}
191
}
192
}
193
}
Copied!

XRC20 Tokens

ByContractAddress

1
Usage:
2
ByContractAddress returns Xrc20 actions given the Xrc20 contract address
3
​
4
Request:
5
address: contract address
6
numberPerPage: number per page
7
page: page number
8
​
9
Response:
10
exist: whether Xrc20 actions exist for the given contract address
11
xrc20:
12
contract: contract address
13
hash: action hash
14
timestamp: timestamp
15
from: sender address
16
to: recipient address
17
quantity: amount transferred
18
count: total number of Xrc20 actions
Copied!

ByAddress

1
Usage:
2
ByAddress returns Xrc20 actions given the sender address or recipient address
3
​
4
Request:
5
address: sender address or recipient address
6
numberPerPage: number per page
7
page: page number
8
​
9
Response:
10
exist: whether Xrc20 actions exist for the given sender address or recipient address
11
xrc20:
12
contract: contract address
13
hash: action hash
14
timestamp: timestamp
15
from: sender address
16
to: recipient address
17
quantity: amount transferred
18
count: total number of Xrc20 actions
Copied!

ByPage

1
Usage:
2
ByPage returns Xrc20 actions by pagination
3
​
4
Request:
5
pagination:
6
skip: starting index of displaying action list
7
first: number of actions to display
8
​
9
Response:
10
exist: whether Xrc20 actions exist
11
xrc20:
12
contract: contract address
13
hash: action hash
14
timestamp: timestamp
15
from: sender address
16
to: recipient address
17
quantity: amount transferred
18
count: total number of Xrc20 actions
Copied!

Xrc20Addresses

1
Usage:
2
Xrc20Addresses returns Xrc20 contract addresses
3
​
4
Request:
5
pagination:
6
skip: starting index of displaying contract address list
7
first: number of contract addresses to display
8
​
9
Response:
10
exist: whether Xrc20 contract addresses exist
11
addresses: contract address list
12
count: total number of Xrc20 contract addresses
Copied!

TokenHolderAddresses

1
Usage:
2
TokenHolderAddresses returns Xrc20 token holder addresses given a Xrc20 contract address
3
​
4
Request:
5
tokenAddress: token contract address
6
pagination:
7
skip: starting index of displaying token holder address list
8
first: number of token holder addresses to display
9
​
10
Response:
11
addresses: token holder address list
12
count: total number of token holder addresses
Copied!
Demo:
1
Sample Request:
2
query{
3
xrc20{
4
byContractAddress(address: "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw", page: 1, numPerPage: 1){
5
exist
6
xrc20 {
7
contract
8
hash
9
timestamp
10
from
11
to
12
quantity
13
}
14
count
15
}
16
byAddress(address: "io1l6a6gu9ks4pwu2tmrzhl6z2el73ydv6e768p5x", page: 1, numPerPage: 1){
17
exist
18
xrc20 {
19
contract
20
hash
21
timestamp
22
from
23
to
24
quantity
25
}
26
count
27
}
28
byPage(pagination: {skip: 0, first: 2}){
29
exist
30
xrc20 {
31
contract
32
hash
33
timestamp
34
from
35
to
36
quantity
37
}
38
count
39
}
40
xrc20Addresses(pagination:{skip: 0, first: 2}){
41
exist
42
addresses
43
count
44
}
45
tokenHolderAddresses(tokenAddress: "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw"){
46
addresses(pagination: {skip: 1, first: 2})
47
count
48
}
49
}
50
}
51
​
52
Sample Response:
53
​
54
{
55
"data": {
56
"xrc20": {
57
"byContractAddress": {
58
"exist": true,
59
"xrc20": [
60
{
61
"contract": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
62
"hash": "052eebdc0bc75715ffedeb34c9322446230448747cef48762be9478fd8a7064e",
63
"timestamp": "1589496125",
64
"from": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
65
"to": "io1xrwjjy26e5dmcxd2dq6hu0zsfrd5qdgqpg57m8",
66
"quantity": "71735598998424445289"
67
}
68
],
69
"count": 80440
70
},
71
"byAddress": {
72
"exist": true,
73
"xrc20": [
74
{
75
"contract": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
76
"hash": "df8c34d9bcee1ed204ba82ebcf5b29722956379ef734c1e1e32fcb6a98968b5d",
77
"timestamp": "1589480485",
78
"from": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
79
"to": "io1l6a6gu9ks4pwu2tmrzhl6z2el73ydv6e768p5x",
80
"quantity": "1031249148674903495207"
81
}
82
],
83
"count": 235
84
},
85
"byPage": {
86
"exist": true,
87
"xrc20": [
88
{
89
"contract": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
90
"hash": "052eebdc0bc75715ffedeb34c9322446230448747cef48762be9478fd8a7064e",
91
"timestamp": "1589496125",
92
"from": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
93
"to": "io1xrwjjy26e5dmcxd2dq6hu0zsfrd5qdgqpg57m8",
94
"quantity": "71735598998424445289"
95
},
96
{
97
"contract": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
98
"hash": "f8a326ddb67c0140be0244a052976d73ca6f8fcb5278c51549df80c347c7a3b6",
99
"timestamp": "1589496065",
100
"from": "io1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqd39ym7",
101
"to": "io1qnwl44fpln3uvxrrhjxkp56y6n3j6cqctp76rq",
102
"quantity": "132716426277978885524"
103
}
104
],
105
"count": 86196
106
},
107
"xrc20Addresses": {
108
"exist": true,
109
"addresses": [
110
"io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw",
111
"io1lvemm43lz6np0hzcqlpk0kpxxww623z5hs4mwu"
112
],
113
"count": 3
114
},
115
"tokenHolderAddresses": {
116
"addresses": [
117
"io1quwq28fk0z6ztyesw8r8aalpww62uf7m6xjf8x",
118
"io1hn57s343wgqrvqkt0mp4fas0wfvgtwecny5lq5"
119
],
120
"count": 1871
121
}
122
}
123
}
124
}
Copied!

XRC721 Tokens

ByContractAddress

1
Usage:
2
ByContractAddress returns Xrc721 actions given the Xrc721 contract address
3
​
4
Request:
5
address: contract address
6
numberPerPage: number per page
7
page: page number
8
​
9
Response:
10
exist: whether Xrc721 actions exist for the given contract address
11
xrc721:
12
contract: contract address
13
hash: action hash
14
timestamp: timestamp
15
from: sender address
16
to: recipient address
17
quantity: amount transferred
18
count: total number of Xrc721 actions
Copied!

ByAddress

1
Usage:
2
ByAddress returns Xrc721 actions given the sender address or recipient address
3
​
4
Request:
5
address: sender address or recipient address
6
numberPerPage: number per page
7
page: page number
8
​
9
Response:
10
exist: whether Xrc721 actions exist for the given sender address or recipient address
11
xrc721:
12
contract: contract address
13
hash: action hash
14
timestamp: timestamp
15
from: sender address
16
to: recipient address
17
quantity: amount transferred
18
count: total number of Xrc721 actions
Copied!

ByPage

1
Usage:
2
ByPage returns Xrc721 actions by pagination
3
​
4
Request:
5
pagination:
6
skip: starting index of displaying action list
7
first: number of actions to display
8
​
9
Response:
10
exist: whether Xrc721 actions exist
11
xrc721:
12
contract: contract address
13
hash: action hash
14
timestamp: timestamp
15
from: sender address
16
to: recipient address
17
quantity: amount transferred
18
count: total number of Xrc721 actions
Copied!

Xrc721Addresses

1
Usage:
2
Xrc721Addresses returns Xrc721 contract addresses
3
​
4
Request:
5
pagination:
6
skip: starting index of displaying contract address list
7
first: number of contract addresses to display
8
​
9
Response:
10
exist: whether Xrc721 contract addresses exist
11
addresses: contract address list
12
count: total number of Xrc721 contract addresses
Copied!

TokenHolderAddresses

1
Usage:
2
TokenHolderAddresses returns Xrc721 token holder addresses given a Xrc721 contract address
3
​
4
Request:
5
tokenAddress: token contract address
6
pagination:
7
skip: starting index of displaying token holder address list
8
first: number of token holder addresses to display
9
​
10
Response:
11
addresses: token holder address list
12
count: total number of token holder addresses
Copied!
TODO: When there are Xrc721 actions on the chain, add a demo here.

TopHolders

1
Usage:
2
TopHolders returns the top IOTX holders
3
​
4
Request:
5
endEpochNumber: end epoch number
6
pagination:
7
skip: starting index of displaying top holder list
8
first: number of top holders to display
9
​
10
Response:
11
address: holder address
12
balance: account balance
Copied!
Demo:
1
Sample Request:
2
​
3
query{
4
topHolders(endEpochNumber: 1000, pagination: {skip: 0, first: 5}){
5
address
6
balance
7
}
8
}
9
​
10
Sample Response:
11
​
12
{
13
"data": {
14
"topHolders": [
15
{
16
"address": "io1uqhmnttmv0pg8prugxxn7d8ex9angrvfjfthxa",
17
"balance": "9782327287860000000000000000"
18
},
19
{
20
"address": "io1v8aj79xc7zdn46rptrqe63g79tgq57s8em2yk5",
21
"balance": "5595872065018750000000000"
22
},
23
{
24
"address": "io1w2zkwsda29cryeg8rtln6wl0nm2mrlfl2xj02c",
25
"balance": "5000000000000000000000000"
26
},
27
{
28
"address": "io17zjv5f97j0d9fp6svqnvf2nf3k4a5pjay9kzp9",
29
"balance": "3457911717681240000000000"
30
},
31
{
32
"address": "io183v7vftj3e4h76z5f5qpswhnn5737rrwjkhyds",
33
"balance": "1222486212327000000000000"
34
}
35
]
36
}
37
}
Copied!

Hermes

1
Usage:
2
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
3
​
4
Request:
5
startEpoch: starting epoch number
6
epochCount: epoch count
7
rewardAddress: Hermes reward address
8
waiverThreshold: threshold for waiving service fee
9
​
10
Response:
11
exist: whether Hermes has bookkeeping information within the specified epoch range
12
hermesDistribution:
13
delegateName: delegate name
14
rewardDistribution:
15
voterEthAddress: voter’s ERC20 address
16
voterIotexAddress: voter’s IoTeX address
17
amount: amount of reward distribution
18
stakingIotexAddress: delegate IoTeX staking address
19
voterCount: number of voters
20
waiveServiceFee: whether the delegate is qualified for waiving the service fee
21
refund: amount of refund
Copied!
Demo: