Get Ether Balance for a Single Address
Returns the Ether balance of a given address.
https://api-sepolia-optimism.etherscan.io/api
?module=account
&action=balance
&address=0x00046e40b355D40a5b3731E9fd584ff4C3446Cd6
&tag=latest
&apikey=YourApiKeyToken
Sample Response
{
"status":"1",
"message":"OK",
"result":"240565588660601218228"
}
Get Ether Balance for Multiple Addresses in a Single Call
Returns the balance of the accounts from a list of addresses.
https://api-sepolia-optimism.etherscan.io/api
?module=account
&action=balancemulti
&address=0x9b991b98f6c7cb053625b88e6fdfde3150aaa00f,0xee2306fddc532f289519ff3c10daec226df9a830,0xb9e30a19db28c756053f6fc91369859ae5f5cd09
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"account": "0x9b991b98f6c7cb053625b88e6fdfde3150aaa00f",
"balance": "19026494098473452301"
},
{
"account": "0xee2306fddc532f289519ff3c10daec226df9a830",
"balance": "989162738508086264"
},
{
"account": "0xb9e30a19db28c756053f6fc91369859ae5f5cd09",
"balance": "6976594014"
}
]
}
Get a list of 'Normal' Transactions By Address
Returns the list of transactions performed by an address, with optional pagination.
https://api-sepolia-optimism.etherscan.io/api
?module=account
&action=txlist
&address=0x9b991b98f6c7cb053625b88e6fdfde3150aaa00f
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "3435768",
"timeStamp": "1698674076",
"hash": "0x7a9560af7ce24718a1cc8ba9f6ab816784b46361a3c49730535bb48cadad6ec1",
"nonce": "0",
"blockHash": "0x7e2c33a4bf9e5055a015e0d5d3af614042a4928064b973a7fd4caf09c643993a",
"transactionIndex": "1",
"from": "0xeeac9396c24e7546a396d4f6743e4b38daa64aa7",
"to": "0x9b991b98f6c7cb053625b88e6fdfde3150aaa00f",
"value": "99868000000000000",
"gas": "21000",
"gasPrice": "1500000050",
"isError": "0",
"txreceipt_status": "1",
"input": "0x",
"contractAddress": "",
"cumulativeGasUsed": "68629",
"gasUsed": "21000",
"confirmations": "984430",
"methodId": "0x",
"functionName": ""
},
{
"blockNumber": "3500860",
"timeStamp": "1698804260",
"hash": "0xf51321917e4d06d9d4971c0f8f8c17002116a64ef35db006c811165a252ae550",
"nonce": "1",
"blockHash": "0xcb5ad57bf90817da7498ad249d9fc614c8e72aabc78dd8e502673b320f6eaa8b",
"transactionIndex": "1",
"from": "0xeeac9396c24e7546a396d4f6743e4b38daa64aa7",
"to": "0x9b991b98f6c7cb053625b88e6fdfde3150aaa00f",
"value": "99960000000000000",
"gas": "21000",
"gasPrice": "1500000050",
"isError": "0",
"txreceipt_status": "1",
"input": "0x",
"contractAddress": "",
"cumulativeGasUsed": "67853",
"gasUsed": "21000",
"confirmations": "919338",
"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-optimism.etherscan.io/api
?module=account
&action=txlistinternal
&address=0xF198A1Af2682538E834bBc5F1af1847Cf50603E1
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "3245939",
"timeStamp": "1698294418",
"hash": "0x3ebd142b98e66a30e89feec679d028cd4ecc5afe7fdaf116bb3848bec637f666",
"from": "0x4200000000000000000000000000000000000010",
"to": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"value": "10000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "343266",
"gasUsed": "0",
"traceId": "0_1_1_1_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "3470287",
"timeStamp": "1698743114",
"hash": "0x03e829d4ca789efecfbeccde8002e977b474f2762965c0c14584c4ae90c27dfb",
"from": "0x4200000000000000000000000000000000000010",
"to": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"value": "1000000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "367854",
"gasUsed": "0",
"traceId": "0_1_1_1_1",
"isError": "0",
"errCode": ""
}
]
}
Get 'Internal Transactions' by Transaction Hash
Returns the list of internal transactions performed within a transaction.
Note : This API endpoint returns a maximum of 10000 records only.
https://api-sepolia-optimism.etherscan.io/api
?module=account
&action=txlistinternal
&txhash=0x03e829d4ca789efecfbeccde8002e977b474f2762965c0c14584c4ae90c27dfb
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "3470287",
"timeStamp": "1698743114",
"from": "0x4200000000000000000000000000000000000007",
"to": "0x4200000000000000000000000000000000000010",
"value": "1000000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "404931",
"gasUsed": "25131",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "3470287",
"timeStamp": "1698743114",
"from": "0x4200000000000000000000000000000000000010",
"to": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"value": "1000000000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "367854",
"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-optimism.etherscan.io/api
?module=account
&action=txlistinternal
&startblock=1203424
&endblock=1204424
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "286948",
"timeStamp": "1692376436",
"hash": "0x056da03c4f82b80ba8645119efe46354e68d6faf675dc59649dcdfd4947ce9c9",
"from": "0x4200000000000000000000000000000000000007",
"to": "0x4200000000000000000000000000000000000010",
"value": "100000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "404966",
"gasUsed": "25131",
"traceId": "0_1_1",
"isError": "0",
"errCode": ""
},
{
"blockNumber": "286948",
"timeStamp": "1692376436",
"hash": "0x056da03c4f82b80ba8645119efe46354e68d6faf675dc59649dcdfd4947ce9c9",
"from": "0x4200000000000000000000000000000000000010",
"to": "0x72fb15f502af58765015972a85f2c58551ef3fa1",
"value": "100000000000000000",
"contractAddress": "",
"input": "",
"type": "call",
"gas": "367888",
"gasUsed": "0",
"traceId": "0_1_1_1_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-optimism.etherscan.io/api
?module=account
&action=tokentx
&contractaddress=0x0091f4e75a03C11cB9be8E3717219005eb780D89
&address=0xf198a1af2682538e834bbc5f1af1847cf50603e1
&page=1
&offset=100
&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",
"result": [
{
"blockNumber": "3470890",
"timeStamp": "1698744320",
"hash": "0x532ad52d53f0a30af21754a336dca50ba5dd3881e38f032abc8a55d428cb172f",
"nonce": "10",
"blockHash": "0x0ceac2fcd09de4fae8fe31c4b624b65105e1b6ed98fa980ddb0c4998a412e3d9",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x0091f4e75a03c11cb9be8e3717219005eb780d89",
"to": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"value": "100000000000000000000000000",
"tokenName": "Dai Stablecoin",
"tokenSymbol": "DAI",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "105765",
"gasPrice": "1500000050",
"gasUsed": "70510",
"cumulativeGasUsed": "117363",
"input": "deprecated",
"confirmations": "949393"
},
{
"blockNumber": "3503663",
"timeStamp": "1698809866",
"hash": "0x5398b0b8d0dd8b0630dc0a02b47ca084152407f1ecfdbe8e4b87faf44648df67",
"nonce": "20",
"blockHash": "0xf1f214f4ab59a9b04c4d2fc831f9e1f5a7737f82067add762c32e3ce942e973b",
"from": "0xf198a1af2682538e834bbc5f1af1847cf50603e1",
"contractAddress": "0x0091f4e75a03c11cb9be8e3717219005eb780d89",
"to": "0xb1956f601b3fb66251b1f6e6ba7de7b741ce531d",
"value": "180000000000000000000000",
"tokenName": "Dai Stablecoin",
"tokenSymbol": "DAI",
"tokenDecimal": "18",
"transactionIndex": "1",
"gas": "5296585",
"gasPrice": "1500000050",
"gasUsed": "3506700",
"cumulativeGasUsed": "3553541",
"input": "deprecated",
"confirmations": "916620"
}
]
}
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-optimism.etherscan.io/api
?module=account
&action=tokennfttx
&contractaddress=0x46E7b6b82F45a9e85c34595E2a5aE76cC67FF5Ba
&address=0x93cffaf883bfdb964c5e66d7b599f8020d919d65
&page=1
&offset=100
&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",
"result": [
{
"blockNumber": "2472617",
"timeStamp": "1696747774",
"hash": "0xe0fe6eb770a0a41cad02372b2f7f910b7281ed0a6fdbe65c2578b3e24869f789",
"nonce": "0",
"blockHash": "0x4a0877a290cca5b7084ac3099d7d4e5b79904eedd5363c468fec59306625c52a",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x46e7b6b82f45a9e85c34595e2a5ae76cc67ff5ba",
"to": "0x93cffaf883bfdb964c5e66d7b599f8020d919d65",
"tokenID": "1",
"tokenName": "Cellula-sepolia",
"tokenSymbol": "Cellula-sepolia",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "1000000",
"gasPrice": "2500000050",
"gasUsed": "281148",
"cumulativeGasUsed": "328001",
"input": "deprecated",
"confirmations": "1947704"
},
{
"blockNumber": "2472632",
"timeStamp": "1696747804",
"hash": "0xe3eacef331db973dcd2dda28f4f4e991e1c5c9c724d935aee865308d69788690",
"nonce": "1",
"blockHash": "0x24e342964231add11914af51c32104c582b1092346ab2ae7788fa0a780b1346e",
"from": "0x0000000000000000000000000000000000000000",
"contractAddress": "0x46e7b6b82f45a9e85c34595e2a5ae76cc67ff5ba",
"to": "0x93cffaf883bfdb964c5e66d7b599f8020d919d65",
"tokenID": "3",
"tokenName": "Cellula-sepolia",
"tokenSymbol": "Cellula-sepolia",
"tokenDecimal": "0",
"transactionIndex": "1",
"gas": "1000000",
"gasPrice": "2500000050",
"gasUsed": "249448",
"cumulativeGasUsed": "296301",
"input": "deprecated",
"confirmations": "1947689"
}
]
}
Last updated