Get Xai Balance for a Single Address
Returns the Xai balance of a given address.
https://api-sepolia.xaiscan.io/api
?module=account
&action=balance
&address=0x5D84f591A87dC5b291345062D96373Ff1DA5B9C2
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser
Sample Response
{
"status": "1",
"message": "OK",
"result": "4947598656589500000000"
}
Get Xai Balance for Multiple Addresses in a Single Call
Returns the balance of the accounts from a list of addresses.
https://api-sepolia.xaiscan.io/api
?module=account
&action=balancemulti
&address=0x5D84f591A87dC5b291345062D96373Ff1DA5B9C2,0xe03787202cbaa50E067B7182C8f25B2bb529f957,0xF5E8A439C599205C1aB06b535DE46681Aed1007a
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"account": "0x5D84f591A87dC5b291345062D96373Ff1DA5B9C2",
"balance": "4947598656589500000000"
},
{
"account": "0xe03787202cbaa50E067B7182C8f25B2bb529f957",
"balance": "1000999907294600000000"
},
{
"account": "0xF5E8A439C599205C1aB06b535DE46681Aed1007a",
"balance": "164748452083504481658"
}
]
}
Get a list of 'Normal' Transactions By Address
Returns the list of transactions performed by an address, with optional pagination.
https://api-sepolia.xaiscan.io/api
?module=account
&action=txlist
&address=0xBAbeCCc528725ab1BFe7EEB6971FD7dbdd65cd85
&startblock=0
&endblock=99999999
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "98535",
"timeStamp": "1704217847",
"hash": "0xd288369123c993064f32be6808b531a7f439c960f4f81116f4dd1b00324770ab",
"nonce": "0",
"blockHash": "0xf8e9039210bc4f4c423b8ab76f9bffee8aace17134227829c3ab8acd150b71b7",
"transactionIndex": "1",
"from": "0xcbcfccc528725ab1bfe7eeb6971fd7dbdd65de96",
"to": "0xbabeccc528725ab1bfe7eeb6971fd7dbdd65cd85",
"value": "50000000000000000000",
"gas": "0",
"gasPrice": "0",
"isError": "0",
"txreceipt_status": "1",
"input": "0x",
"contractAddress": "",
"cumulativeGasUsed": "0",
"gasUsed": "0.000000",
"confirmations": "4406565",
"methodId": "0x",
"functionName": ""
},
{
"blockNumber": "98690",
"timeStamp": "1704222685",
"hash": "0x4135a446792c1cc29d8538a16923ee25286c150930b30b2bb3efc2e2a7417bd6",
"nonce": "0",
"blockHash": "0xf69d907fa7bc700191f6662986e80340f364eaa287f0c25502ecb789b0bd7d88",
"transactionIndex": "1",
"from": "0xcbcfccc528725ab1bfe7eeb6971fd7dbdd65de96",
"to": "0xbabeccc528725ab1bfe7eeb6971fd7dbdd65cd85",
"value": "50000000000000000000",
"gas": "0",
"gasPrice": "0",
"isError": "0",
"txreceipt_status": "1",
"input": "0x",
"contractAddress": "",
"cumulativeGasUsed": "0",
"gasUsed": "0.000000",
"confirmations": "4406410",
"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-sepolia.xaiscan.io/api
?module=account
&action=txlistinternal
&address=0x4337002C5702CE424Cb62A56CA038e31e1D4A93d
&startblock=0
&endblock=99999999
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "165905",
"timeStamp": "1706326648",
"hash": "0x08fa68ed5955949bf8bb239f483ea760b2b7d4695ff8aae63ff8f7ee028415cd",
"from": "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789",
"to": "0x4337002c5702ce424cb62a56ca038e31e1d4a93d",
"value": "9507800000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "152367",
"gasUsed": "0",
"traceId": "0_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "190879",
"timeStamp": "1707065412",
"hash": "0x0296a6eb38f993be643aa4f8833db3f61eec29b1423eb64c658c86baf7300c5a",
"from": "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789",
"to": "0x4337002c5702ce424cb62a56ca038e31e1d4a93d",
"value": "9507800000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "149284",
"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-sepolia.xaiscan.io/api
?module=account
&action=txlistinternal
&txhash=0x71a3b82477c458d1760f4f0a67b2ed991b59a30415f2b708a8322b0102f5fb95
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "4504313",
"timeStamp": "1723628962",
"from": "0x85e23b94e7f5e9cc1ff78bce78cfb15b81f0df00",
"to": "",
"value": "0",
"contractAddress": "0x25b1798877b1b4645c3fc91dde69fad89a1a546c",
"input": "",
"type": "create2",
"gas": "515277",
"gasUsed": "9031",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "4504313",
"timeStamp": "1723628962",
"from": "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789",
"to": "0x4337002c5702ce424cb62a56ca038e31e1d4a93d",
"value": "50579064400000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "699375",
"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-sepolia.xaiscan.io/api
?module=account
&action=txlistinternal
&startblock=0
&endblock=latest
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "1",
"timeStamp": "1700819898",
"hash": "0x75b36d122026abd8ddaf96687788f2bf71f8a77869bf132fd51ecbbec1b122e1",
"from": "0x0000000000000000000000000000000000000000",
"to": "0xebc4c123515da9525d72d78af5eea9b11e150691",
"value": "10002100000000000",
"contractAddress": "",
"input": "",
"type": "invalid",
"gas": "0",
"gasUsed": "0",
"traceId": "0_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "1",
"timeStamp": "1700819898",
"hash": "0x75b36d122026abd8ddaf96687788f2bf71f8a77869bf132fd51ecbbec1b122e1",
"from": "0xebc4c123515da9525d72d78af5eea9b11e150691",
"to": "0x71b61c2e250afa05dfc36304d6c91501be0965d8",
"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-sepolia.xaiscan.io/api
?module=account
&action=tokentx
&contractaddress=0xE267C440dbFb1e185D506C2CC3C44eB21340E046
&address=0xe829AB1f978256168a9ab8668e0211d216d7a655
&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.
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "589700",
"timeStamp": "1715873380",
"hash": "0x850ad322d001d8a9de14dc3896503f478ea27ae7cdf53805f7353792011f2011",
"nonce": "1242",
"blockHash": "0x77f8176d1fe1eff7e42b7ae00affa1f6cd6ba5b5e94f46118135ae1735ed9f15",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0xe267c440dbfb1e185d506c2cc3c44eb21340e046",
"to": "0xe829ab1f978256168a9ab8668e0211d216d7a655",
"value": "10000000000000000000000000",
"tokenName": "Crypto Unicorns",
"tokenSymbol": "CU",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "97898",
"gasPrice": "100000000",
"gasUsed": "92294.000000",
"cumulativeGasUsed": "92294",
"input": "deprecated",
"confirmations": "3915499"
}
]
}
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-sepolia.xaiscan.io/api
?module=account
&action=tokennfttx
&contractaddress=0x2303cA82D30D99F2bC42FfF2F388291Bb2017E2F
&address=0x7EAfB82CDBdCe54d5305a9251e780cF3e8BFa8d0
&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.
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "4487155",
"timeStamp": "1723594766",
"hash": "0x0b37e043c33eaf308729fd64c1e699b3d6fe4400b7bd81d64ed4e3234b3e699e",
"nonce": "9213",
"blockHash": "0x4a956c8394f4eb4579eb0fe0373777aff78e83fb44e3abe4b1632b62769574f4",
"from": "0xa14c6885a6b1b15a06addea738b013924ec1daa8",
"contractAddress": "0x2303ca82d30d99f2bc42fff2f388291bb2017e2f",
"to": "0x7eafb82cdbdce54d5305a9251e780cf3e8bfa8d0",
"tokenID": "0",
"tokenName": "Ex Populus Trading Card System",
"tokenSymbol": "XPTCS",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "1123514",
"gasPrice": "100600000",
"gasUsed": "828826.000000",
"cumulativeGasUsed": "828826",
"input": "deprecated",
"confirmations": "18074"
},
{
"blockNumber": "4487155",
"timeStamp": "1723594766",
"hash": "0x0b37e043c33eaf308729fd64c1e699b3d6fe4400b7bd81d64ed4e3234b3e699e",
"nonce": "9213",
"blockHash": "0x4a956c8394f4eb4579eb0fe0373777aff78e83fb44e3abe4b1632b62769574f4",
"from": "0xa14c6885a6b1b15a06addea738b013924ec1daa8",
"contractAddress": "0x2303ca82d30d99f2bc42fff2f388291bb2017e2f",
"to": "0x7eafb82cdbdce54d5305a9251e780cf3e8bfa8d0",
"tokenID": "1",
"tokenName": "Ex Populus Trading Card System",
"tokenSymbol": "XPTCS",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "1123514",
"gasPrice": "100600000",
"gasUsed": "828826.000000",
"cumulativeGasUsed": "828826",
"input": "deprecated",
"confirmations": "18074"
}
]
}
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-sepolia.xaiscan.io/api
?module=account
&action=token1155tx
&contractaddress=0x870eceF7Ac6713B784Fee6159Cb25D99e40869fb
&address=0x2FBfB3e2Ef60003B0A5055E489E8dc0FC51c1Cc0
&page=1
&offset=2
&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.
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"blockNumber": "3866037",
"timeStamp": "1722360298",
"hash": "0x9193e9c8d0bf938822d8723dce933702fc072c82967244d72aff93e3648f1f8d",
"nonce": "7798",
"blockHash": "0xfd56071672898111a3c26a6642e373cf7384d53727f42617245cf5f935a2e371",
"transactionIndex": "1",
"gas": "1202955",
"gasPrice": "100600000",
"gasUsed": "489314.000000",
"cumulativeGasUsed": "489314",
"input": "deprecated",
"contractAddress": "0x870ecef7ac6713b784fee6159cb25d99e40869fb",
"from": "0x0000000000000000000000000000000000000000",
"to": "0x2fbfb3e2ef60003b0a5055e489e8dc0fc51c1cc0",
"tokenID": "0",
"tokenValue": "1",
"tokenName": "CatAttackNFT",
"tokenSymbol": "CAT",
"confirmations": "639221"
},
{
"blockNumber": "3873074",
"timeStamp": "1722373620",
"hash": "0xd614f86f59350812ae6851447598c88e4f9af6860af1ae878326badc7a1c44e3",
"nonce": "7803",
"blockHash": "0x9eaa6393baf10c2f175d85f4c396dc2fd3098fd5491ed5ce6e74e412d20f6fbe",
"transactionIndex": "1",
"gas": "443632",
"gasPrice": "100600000",
"gasUsed": "202797.000000",
"cumulativeGasUsed": "202797",
"input": "deprecated",
"contractAddress": "0x870ecef7ac6713b784fee6159cb25d99e40869fb",
"from": "0x2fbfb3e2ef60003b0a5055e489e8dc0fc51c1cc0",
"to": "0x98f5ed44cacdcf311420d078a51d3679467b0017",
"tokenID": "0",
"tokenValue": "1",
"tokenName": "CatAttackNFT",
"tokenSymbol": "CAT",
"confirmations": "632184"
}
]
}