Get Xai Balance for a Single Address
Returns the Xai balance of a given address.
https://api.xaiscan.io/api
?module=account
&action=balance
&address=0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"status": "1",
"message": "OK",
"result": "2614273927139105211434"
}
Get Xai Balance for Multiple Addresses in a Single Call
Returns the balance of the accounts from a list of addresses.
https://api.xaiscan.io/api
?module=account
&action=balancemulti
&address=0x41d2F3add533465d1038bFAC72855e8430f92eec,0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18,0xB8FF877ed78Ba520Ece21B1de7843A8a57cA47Cb,0xc3ac498cdfb6e1dcfa17cbc55e514560f26a1922
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the strings representing the addresses to check for balance, separated by , commas
up to 20 addresses per call |
| the integer pre-defined block parameter, either earliest , pending or latest |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"account": "0x41d2F3add533465d1038bFAC72855e8430f92eec",
"balance": "2760964458237782576610"
},
{
"account": "0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18",
"balance": "2614273927139105211434"
},
{
"account": "0xB8FF877ed78Ba520Ece21B1de7843A8a57cA47Cb",
"balance": "2099976360025564987958"
},
{
"account": "0xc3ac498cdfb6e1dcfa17cbc55e514560f26a1922",
"balance": "0"
}
]
}
Get a list of 'Normal' Transactions By Address
Returns the list of transactions performed by an address, with optional pagination.
📝 Note : This API endpoint returns a maximum of 10000 records only.
https://api.xaiscan.io/api
?module=account
&action=txlist
&address=0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18
&startblock=0
&endblock=99999999
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the addresses to check for balance |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
💡 Tip: Specify a smaller startblock
and endblock
range for faster search results.
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "11533",
"timeStamp": "1705145357",
"hash": "0xe47ff4e047c7d297c8c6e11226ab4787111fba9cd527d53d688ae29fffebeef0",
"nonce": "0",
"blockHash": "0xfdcb53e5622361429fb71a3d4e97a177e3a2b4e89956b0c8bc10a6c657be8ec2",
"transactionIndex": "1",
"from": "0x92bdc319a1a50c0faebd6882643a0cc8b6da6b29",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "1000000000000000000",
"gas": "0",
"gasPrice": "0",
"isError": "0",
"txreceipt_status": "1",
"input": "0x",
"contractAddress": "",
"cumulativeGasUsed": "0",
"gasUsed": "0.000000",
"confirmations": "16628084",
"methodId": "0x",
"functionName": ""
},
{
"blockNumber": "11552",
"timeStamp": "1705145953",
"hash": "0x226a55763cad35439a33c8ff625fc906925a8ad6cde08688a1facf0387b9fb31",
"nonce": "0",
"blockHash": "0x0f52749121ea455e27dfc9d5a4a7df756bc2566aceb4737c17e4450c11339e8b",
"transactionIndex": "1",
"from": "0x92bdc319a1a50c0faebd6882643a0cc8b6da6b29",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "2613369084967320261434",
"gas": "0",
"gasPrice": "0",
"isError": "0",
"txreceipt_status": "1",
"input": "0x",
"contractAddress": "",
"cumulativeGasUsed": "0",
"gasUsed": "0.000000",
"confirmations": "16628065",
"methodId": "0x",
"functionName": ""
}
]
}
Get a list of 'Internal' Transactions by Address
Returns the list of internal transactions performed by an address, with optional pagination.
https://api.xaiscan.io/api
?module=account
&action=txlistinternal
&address=0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18
&startblock=0
&endblock=99999999
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the addresses to check for balance |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
💡 Tip: Specify a smaller startblock
and endblock
range for faster search results
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "1835737",
"timeStamp": "1708844344",
"hash": "0xe461fc40ace5bc04a8c63dd46d5718c7cfa4f19f3172e82e9df54e24d5770794",
"from": "0x36be1fd6ff2a6beb34b500a04f89103a524516d8",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "10010000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "2300",
"gasUsed": "0",
"traceId": "0_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "1835862",
"timeStamp": "1708844489",
"hash": "0xfde1a894f0532396a7aa5d9b3d2e9b4a96b68138c3ea614733068c2e61705438",
"from": "0x36be1fd6ff2a6beb34b500a04f89103a524516d8",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "110000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "2300",
"gasUsed": "0",
"traceId": "0_1",
"isError": "0",
"errCode": ""
}
]
}
Get 'Internal Transactions' by Transaction Hash
Returns the list of internal transactions performed within a transaction.
https://api.xaiscan.io/api
?module=account
&action=txlistinternal
&txhash=0xfde1a894f0532396a7aa5d9b3d2e9b4a96b68138c3ea614733068c2e61705438
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the transaction hash to check for internal transactions |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "1835862",
"timeStamp": "1708844489",
"from": "0x36be1fd6ff2a6beb34b500a04f89103a524516d8",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "110000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "2300",
"gasUsed": "0",
"isError": "0",
"errCode": ""
}
]
}
The isError
field returns 0
for successful transactions and 1
for rejected/cancelled transactions.
Get "Internal Transactions" by Block Range
Returns the list of internal transactions performed within a block range, with optional pagination.
https://api.xaiscan.io/api
?module=account
&action=txlistinternal
&startblock=0
&endblock=latest
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "1",
"timeStamp": "1704370107",
"hash": "0x0a7a7b295f9f0fb97381512809ad3e8c737e4a0cdbd669a9eaf7655ae9b63dbc",
"from": "0x0000000000000000000000000000000000000000",
"to": "0xa1e78b056c411015eae3ec0b98ad94e2c9142b02",
"value": "10002100000000000",
"contractAddress": "",
"input": "",
"type": "invalid",
"gas": "0",
"gasUsed": "0",
"traceId": "0_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "1",
"timeStamp": "1704370107",
"hash": "0x0a7a7b295f9f0fb97381512809ad3e8c737e4a0cdbd669a9eaf7655ae9b63dbc",
"from": "0xa1e78b056c411015eae3ec0b98ad94e2c9142b02",
"to": "0xc7185e37a4ab4af0e77bc08249cd2590ae3e1b51",
"value": "0",
"contractAddress": "",
"input": "",
"type": "invalid",
"gas": "0",
"gasUsed": "0",
"traceId": "0_1",
"isError": "0",
"errCode": ""
}
]
}
The isError
field returns 0
for successful transactions and 1
for rejected/cancelled transactions.
Get a list of 'ERC20 - Token Transfer Events' by Address
Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract.
https://api.xaiscan.io/api
?module=account
&action=tokentx
&contractaddress=0x8DF2CDec3ec9a8A65998c866422c152D3dA52fB2
&address=0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18
&page=1
&offset=2
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-20 transfers from an address, specify the address
parameter
ERC-20 transfers from a contract address, specify the contract address
parameter
ERC-20 transfers from an address filtered by a token contract, specify both address
and contract address
parameters.
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string representing the token contract address to check for balance |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "211825",
"timeStamp": "1706560664",
"hash": "0x45a85557f9c111ca9f5d45cf51b2778eebbdf27dfba91f40979561eebeb14c26",
"nonce": "1",
"blockHash": "0xf2a931f38f7c59080f266a9d30c5c2e6ae377750b0ad8ec4397726558df75bd0",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x8df2cdec3ec9a8a65998c866422c152d3da52fb2",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "240000000000000000000",
"tokenName": "KaleidoPoint",
"tokenSymbol": "KALEIP",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "109808",
"gasPrice": "1600000000",
"gasUsed": "107605.000000",
"cumulativeGasUsed": "107605",
"input": "deprecated",
"confirmations": "16429532"
},
{
"blockNumber": "211830",
"timeStamp": "1706560686",
"hash": "0xdd96080d117ed91c886e71311071d7a9b6d05299d9764386b7e8a55d54db44e9",
"nonce": "2",
"blockHash": "0xe43e760f8e99dbef4ebb3bcc51d1aa6970082f3a61e2b671f749096410cfa1fe",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x8df2cdec3ec9a8a65998c866422c152d3da52fb2",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"value": "60000000000000000000",
"tokenName": "KaleidoPoint",
"tokenSymbol": "KALEIP",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "92425",
"gasPrice": "1600000000",
"gasUsed": "90493.000000",
"cumulativeGasUsed": "90493",
"input": "deprecated",
"confirmations": "16429527"
}
]
}
Get a list of 'ERC721 - Token Transfer Events' by Address
Returns the list of ERC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract
https://api.xaiscan.io/api
?module=account
&action=tokennfttx
&contractaddress=0x299e90B375ceeA4c27bAe0ffdc7105F0BF0B5bE4
&address=0x81ACC319a1A50C0FaeBd6882643A0CC8b6Da5A18
&page=1
&offset=2
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-721 transfers from an address, specify the address
parameter
ERC-721 transfers from a contract address, specify the contract address
parameter
ERC-721 transfers from an address filtered by a token contract, specify both address
and contract address
parameters.
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string representing the token contract address to check for balance |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "2072966",
"timeStamp": "1709318167",
"hash": "0x0f9c5e05f04936305ddd8efc45428b635f40ac90248543907601c1e75e9476f9",
"nonce": "121",
"blockHash": "0x0270b9e2b49081c28808476afaea29ef396f2d31bde7dc1ea1ee4f65ca102918",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x299e90b375ceea4c27bae0ffdc7105f0bf0b5be4",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"tokenID": "8310",
"tokenName": "KaleidoPet NFT",
"tokenSymbol": "KALEIPET",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "222362",
"gasPrice": "1600000000",
"gasUsed": "213196.000000",
"cumulativeGasUsed": "213196",
"input": "deprecated",
"confirmations": "14568677"
},
{
"blockNumber": "2106374",
"timeStamp": "1709410078",
"hash": "0x05b7373448d4d35e0381327684d18c50a76b61cb8c25eddd31be1df4eca83a3c",
"nonce": "128",
"blockHash": "0x58c6a71fd2a138798500fd26b17e296943a41ac91025124d06ef3a7e8118090d",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x299e90b375ceea4c27bae0ffdc7105f0bf0b5be4",
"to": "0x81acc319a1a50c0faebd6882643a0cc8b6da5a18",
"tokenID": "8329",
"tokenName": "KaleidoPet NFT",
"tokenSymbol": "KALEIPET",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "186296",
"gasPrice": "1600000000",
"gasUsed": "178397.000000",
"cumulativeGasUsed": "178397",
"input": "deprecated",
"confirmations": "14535269"
}
]
}
Get a list of 'ERC1155 - Token Transfer Events' by Address
Returns the list of ERC-1155 ( Multi Token Standard ) tokens transferred by an address, with optional filtering by token contract.
https://api.xaiscan.io/api
?module=account
&action=token1155tx
&contractaddress=0xDCb313BC098b5b2A315EcAC5c3f3eAa6ddCd34E4
&address=0x0000000000000000000000000000000000000000
&page=1
&offset=100
&startblock=0
&endblock=latest
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-1155 transfers from an address, specify the address
parameter
ERC-1155 transfers from a contract address, specify the contract address
parameter
ERC-1155 transfers from an address filtered by a token contract, specify both address
and contract address
parameters.
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string representing the token contract address to check for balance |
| the integer page number, if pagination is enabled |
| the number of transactions displayed per page |
| the integer block number to start searching for transactions |
| the integer block number to stop searching for transactions |
| the sorting preference, use asc to sort by ascending and desc to sort by descending |
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"13472395",
"timeStamp":"1634973285",
"hash":"0x643b15f3ffaad5d38e33e5872b4ebaa7a643eda8b50ffd5331f682934ee65d4d",
"nonce":"41",
"blockHash":"0xa5da536dfbe8125eb146114e2ee0d0bdef2b20483aacbf30fed6b60f092059e6",
"transactionIndex":"100",
"gas":"140000",
"gasPrice":"52898577246",
"gasUsed":"105030",
"cumulativeGasUsed":"11739203",
"input":"deprecated",
"contractAddress":"0x76be3b62873462d2142405439777e971754e8e77",
"from":"0x1e63326a84d2fa207bdfa856da9278a93deba418",
"to":"0x83f564d180b58ad9a02a449105568189ee7de8cb",
"tokenID":"10371",
"tokenValue":"1",
"tokenName":"parallel",
"tokenSymbol":"LL",
"confirmations":"1447769"
},
{
"blockNumber":"14049909",
"timeStamp":"1642781541",
"hash":"0x58353aab15a4b5a77333b87619edaa749c7f3cf8bb2263a1c0865d73bf1264bd",
"nonce":"4",
"blockHash":"0x1e88a63a4cb4086a747644b8ab7ff3434540930f3029eacb8add08b15974fdc9",
"transactionIndex":"114",
"gas":"253032",
"gasPrice":"225052869211",
"gasUsed":"184899",
"cumulativeGasUsed":"6855790",
"input":"deprecated",
"contractAddress":"0x76be3b62873462d2142405439777e971754e8e77",
"from":"0x83f564d180b58ad9a02a449105568189ee7de8cb",
"to":"0x80833dc92d326a81d0cb74982a8e6f1a3887f837",
"tokenID":"10371",
"tokenValue":"1",
"tokenName":"parallel",
"tokenSymbol":"LL",
"confirmations":"870255"
},
{
"blockNumber":"14067255",
"timeStamp":"1643012777",
"hash":"0x3222b5f71e577c2551e17701eaf39b308b976bbe6bf6ce3f8c20549527b9d6ae",
"nonce":"7",
"blockHash":"0x236cfed8b42fa6cb8956f6e7b889797047d9af0883066b1f3be8284beda16e17",
"transactionIndex":"172",
"gas":"56873",
"gasPrice":"69434775835",
"gasUsed":"52073",
"cumulativeGasUsed":"17181952",
"input":"deprecated",
"contractAddress":"0x76be3b62873462d2142405439777e971754e8e77",
"from":"0x9d48305f859a0006b57da25c80af62ecb8e5c6a2",
"to":"0x83f564d180b58ad9a02a449105568189ee7de8cb",
"tokenID":"10372",
"tokenValue":"1",
"tokenName":"parallel",
"tokenSymbol":"LL",
"confirmations":"852909"
}
]
}
Last updated