Get Ether Balance for a Single Address
Returns the Ether balance of a given address.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=balance
&address=0x11799622F4D98A24514011E8527B969f7488eF47
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
the string
representing the address to check for balance
the string
pre-defined block parameter, either earliest
, pending
or latest
Sample response
Copy {
"status": "1",
"message": "OK",
"result": "819838745522324517"
}
Get Ether Balance for Multiple Addresses in a Single Call
Returns the balance of the accounts from a list of addresses.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=balancemulti
&address=0x7462da033c5cceB21691D2447af34f3E333E0b85,0xb2e2b1f036f31a9a97d3fc377a47581c813123aa,0x6ca4166eefd64b5f607f12fb0c3fbae233897757
&tag=latest
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
the strings
representing the addresses to check for balance, separated by ,
up to 20 addresses per call
the integer
pre-defined block parameter, either earliest
, pending
or latest
Sample Response
Copy {
"status":"1",
"message":"OK",
"result":[
{
"account":"0x7462da033c5cceB21691D2447af34f3E333E0b85",
"balance":"460010533098075840"
},
{
"account":"0xb2e2b1f036f31a9a97d3fc377a47581c813123aa",
"balance":"396515312403899380"
},
{
"account":"0x6ca4166eefd64b5f607f12fb0c3fbae233897757",
"balance":"26865078968855852179"
}
]
}
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.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=txlist
&address=0x2479B47559f85B79894553f776529847E5bB389A
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
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 descendin Tip: Specify a smaller startblock
and endblock
range for faster search results.
Sample Response
Copy {
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"9315096",
"blockHash":"0x4ae627d278ae01fbdae0ba85073a9836930ebd9edf9b7543bb7453eace072385",
"timeStamp":"1653915397",
"hash":"0xc0b8aaa311db85a547990404dc0861f5d400e1a97f8ea50dbbfb266a4475442f",
"nonce":"3",
"transactionIndex":"0",
"from":"0x76677fa054e38fdf8cae579b75afcdfb15e930e2",
"to":"0x2479b47559f85b79894553f776529847e5bb389a",
"value":"5000000000000000",
"gas":"21000",
"gasPrice":"1000000",
"input":"0x",
"methodId":"0x",
"functionName":"",
"contractAddress":"",
"cumulativeGasUsed":"21000",
"txreceipt_status":"1",
"gasUsed":"21000",
"confirmations":"14110341",
"isError":"0"
},
{
"blockNumber":"9315535",
"blockHash":"0xe754ca98503273a09307bba7d84e38eee732f8a3bdd4b78764d60f101e0fe67e",
"timeStamp":"1653915928",
"hash":"0x3f7378cfeec30c2bf3ec010908b84b56605d1343a60ffebcf72e9ccbd34ea138",
"nonce":"0",
"transactionIndex":"0",
"from":"0x2479b47559f85b79894553f776529847e5bb389a",
"to":"0x9d39fc627a6d9d9f8c831c16995b209548cc3401",
"value":"7788000000000000000",
"gas":"83679",
"gasPrice":"1000000",
"input":"0x3f2e5fc30000000000000000000000002479b47559f85b79894553f776529847e5bb389a0000000000000000000000000000000000000000000000006c1488bcc6be0000000000000000000000000000000000000000000000000000000000000000a4b100000000000000000000000000000000000000000000000000000181151257590000000000000000000000000000000000000000000000000000000000001476",
"methodId":"0x3f2e5fc3",
"functionName":"sendNative(address _receiver, uint256 _amount, uint64 _dstChainId, uint64 _nonce, uint32 _maxSlippage)",
"contractAddress":"",
"cumulativeGasUsed":"78695",
"txreceipt_status":"1",
"gasUsed":"78695",
"confirmations":"14109902",
"isError":"0"
}
]
}
Get a list of 'Internal' Transactions by Address
Returns the list of internal transactions performed by an address, with optional pagination.
📝 Note : This API endpoint returns a maximum of 10000 records only.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=txlistinternal
&address=0xE592427A0AEce92De3Edee1F18E0157C05861564
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
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
Copy {
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"2485",
"timeStamp":"1636681933",
"hash":"0x1c361686affdfe44d894e3200ddd075d734bcf2bf2d3c0ff004f00d4cd231053",
"from":"0xe592427a0aece92de3edee1f18e0157c05861564",
"to":"0x4200000000000000000000000000000000000006",
"value":"1000000000000000",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"229223",
"gasUsed":"23802",
"traceId":"0_1_1_1",
"isError":"0",
"errCode":""
},
{
"blockNumber":"2486",
"timeStamp":"1636681933",
"hash":"0xfeb5ee769b411466f97734462a00c2d6c26cfb7a256f1057f0eb471bb31f5064",
"from":"0x4200000000000000000000000000000000000006",
"to":"0xe592427a0aece92de3edee1f18e0157c05861564",
"value":"206045760272155908",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"2300",
"gasUsed":"83",
"traceId":"0_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.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=txlistinternal
&txhash=0x143a026d2a4719c0008f294d0f94ac007e7460435e5d5b14fbd7e6ad1a85a416
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
the string
representing the transaction hash to check for internal transactions
Sample Response
Copy {
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"23435077",
"timeStamp":"1663339441",
"from":"0x388ade22cc03d8f75d23a625cc35f4aead0549e6",
"to":"0xacc066d74a3fd7fafd9149fc18f400c1d085614e",
"value":"109675151",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"0",
"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.
📝 Note : This API endpoint returns a maximum of 10000 records only.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=txlistinternal
&startblock=23434077
&endblock=23435077
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
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
Copy {
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"23434077",
"timeStamp":"1663338972",
"hash":"0x40745e75871b5be007f14b0dfb5100682c9eafab847c26fb1682125339fe38b1",
"from":"0x83f6244bd87662118d96d9a6d44f09dfff14b30e",
"to":"0xe38faf9040c7f09958c638bbdb977083722c5156",
"value":"0",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"407845",
"gasUsed":"14901",
"traceId":"0_1",
"isError":"0",
"errCode":""
},
{
"blockNumber":"23434077",
"timeStamp":"1663338972",
"hash":"0x40745e75871b5be007f14b0dfb5100682c9eafab847c26fb1682125339fe38b1",
"from":"0x83f6244bd87662118d96d9a6d44f09dfff14b30e",
"to":"0xe38faf9040c7f09958c638bbdb977083722c5156",
"value":"0",
"contractAddress":"",
"input":"",
"type":"call",
"gas":"392626",
"gasUsed":"25201",
"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.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=tokentx
&contractaddress=0x7f5c764cbc14f9669b88837ca1490cca17c31607
&address=0x5da062f3d4504510bfea6a610ccde9a6c502da29
&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.
Try this endpoint in your browser 🔗
Request Response
Query Parameters
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
Copy {
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"21011291",
"timeStamp":"1661776600",
"hash":"0xa9826b2b2180ef945ad7df5509284cf9ceab81e977a2ccce1b6cd21a4587f1d5",
"nonce":"31146",
"blockHash":"0xbd7c54fa39db43f2353ccf443f15ff2733b290114f9cc52709e3677380bcb441",
"from":"0x5da062f3d4504510bfea6a610ccde9a6c502da29",
"to":"0x7cec228743276088870725f434af2d2d5e16ba72",
"contractAddress":"0x7f5c764cbc14f9669b88837ca1490cca17c31607",
"value":"0",
"tokenName":"USD Coin",
"tokenSymbol":"USDC",
"tokenDecimal":"6",
"transactionIndex":"0",
"gas":"15000000",
"gasPrice":"1000000",
"gasUsed":"4724267",
"cumulativeGasUsed":"4724267",
"input":"deprecated",
"confirmations":"2425337"
},
{
"blockNumber":"21012031",
"timeStamp":"1661776922",
"hash":"0x15db84f600746fa420927ff44e1fc9db7119f511988e2da460e1645e4d14d352",
"nonce":"31148",
"blockHash":"0x96174a7da0516e76e3ff8f279e9892e8f2ee171d592975010ab47aa8730baf36",
"from":"0x47029bc8f5cbe3b464004e87ef9c9419a48018cd",
"to":"0x5da062f3d4504510bfea6a610ccde9a6c502da29",
"contractAddress":"0x7f5c764cbc14f9669b88837ca1490cca17c31607",
"value":"64058384",
"tokenName":"USD Coin",
"tokenSymbol":"USDC",
"tokenDecimal":"6",
"transactionIndex":"0",
"gas":"15000000",
"gasPrice":"1000000",
"gasUsed":"14401974",
"cumulativeGasUsed":"14401974",
"input":"deprecated",
"confirmations":"2424597"
}
]
}
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.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=tokennfttx
&contractaddress=0x63d29f9c28ce781dacb284a99b1239a25e3e2159
&address=0xa20e8a921b969e690c1f7ef8dcc1ea88821cd4a1
&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.
Try this endpoint in your browser 🔗
Request Response
Query Parameters
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
Copy {
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"23253292",
"timeStamp":"1663235747",
"hash":"0x6fed0f96e19c8d003843963ccc09b5a2cedc2a8945a34dc58349ed7d7eea7a02",
"nonce":"23",
"blockHash":"0x6e1a8f03ad105079e6dbbc4fc65221d0cda1c4f181cdb1bcfe0d98f25519f0da",
"from":"0x0000000000000000000000000000000000000000",
"contractAddress":"0x63d29f9c28ce781dacb284a99b1239a25e3e2159",
"to":"0xa20e8a921b969e690c1f7ef8dcc1ea88821cd4a1",
"tokenID":"570",
"tokenName":"Merge Bear",
"tokenSymbol":"MB",
"tokenDecimal":"0",
"transactionIndex":"0",
"gas":"183178",
"gasPrice":"1000000",
"gasUsed":"183178",
"cumulativeGasUsed":"183178",
"input":"deprecated",
"confirmations":"184038"
},
{
"blockNumber":"23254617",
"timeStamp":"1663236385",
"hash":"0x9af7ccaee1d48454f7811f570f5fa515b91ce0ec54cc020ef845863158286693",
"nonce":"24",
"blockHash":"0x870e42ad5bc7ec9912b3056e601c2a789efd932957b4a20cd830291c7f509d68",
"from":"0x0000000000000000000000000000000000000000",
"contractAddress":"0x63d29f9c28ce781dacb284a99b1239a25e3e2159",
"to":"0xa20e8a921b969e690c1f7ef8dcc1ea88821cd4a1",
"tokenID":"598",
"tokenName":"Merge Bear",
"tokenSymbol":"MB",
"tokenDecimal":"0",
"transactionIndex":"0",
"gas":"166078",
"gasPrice":"1000000",
"gasUsed":"166078",
"cumulativeGasUsed":"166078",
"input":"deprecated",
"confirmations":"182713"
}
]
}
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.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=token1155tx
&contractaddress=0x0D380362762B0cf375227037f2217f59A4eC4b9E
&address=0x9d25756c550630a156d8c498ac42bd64925dab2d
&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 🔗
Request Response
Query Parameters
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
Copy {
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "111955912",
"timeStamp": "1699510601",
"hash": "0x5c8e5551487055736dda66996b732a7251b7b4de83a91ba85f3a0054229fe9eb",
"nonce": "28",
"blockHash": "0xc527b322017bc048b142f4fbf27b57b90c02491ac84711131cbb14ce6b418394",
"transactionIndex": "2",
"gas": "236090",
"gasPrice": "11093298",
"gasUsed": "225281",
"cumulativeGasUsed": "293194",
"input": "deprecated",
"contractAddress": "0x0d380362762b0cf375227037f2217f59a4ec4b9e",
"from": "0x7b263a4851e75d152e0f67abc9e112fb933bb0d8",
"to": "0x9d25756c550630a156d8c498ac42bd64925dab2d",
"tokenID": "1",
"tokenValue": "1",
"tokenName": "",
"tokenSymbol": "",
"confirmations": "731"
}
]
}
Returns the historical ETH balance of an address at a certain block height.
📝 Note : This endpoint is throttled to 2 calls/second regardless of API Pro tier.
Copy https://api-optimistic.etherscan.io/api
?module=account
&action=balancehistory
&address=0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
&blockno=116110804
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Request Response
Query Parameters
the strings
representing the addresses to check for balance, separated by ,
commas
the integer
block number to check balance for eg. 2000000
Sample Response
Copy {
"status":"1",
"message":"OK",
"result":"25249603270502032556897498"
}
Last updated 9 months ago