- Takes: Crypto wallet
- Passive: the target is not contacted
- Plan: Any plan
Set module and action as listed in the overview, then the parameters of that action. Examples: account/balance, account/txlist, account/tokentx, contract/getsourcecode, contract/getcontractcreation, transaction/getstatus, ens/forwardresolve.
Query parameters
chainidChain ID, for example 1 for Ethereum or 42161 for Arbitrum (ens/forwardresolve: 1 only)
moduleModule of the action
actionAction within the module
addressAddress to query (balance, txlist, tokentx, getsourcecode)
contractaddressERC-20 token contract to filter by (tokentx)
contractaddressesUp to 5 contract addresses, comma-separated (getcontractcreation)
txhashTransaction hash (getstatus)
nameENS name to resolve (forwardresolve)
taglatest, or a hex block number within the last 128 blocks (balance)
startblockBlock number to start from (txlist, tokentx)
endblockBlock number to stop at (txlist, tokentx)
pagePage number (txlist, tokentx)
offsetRecords per page (txlist, tokentx)
sortdesc returns the latest first, asc the oldest first (txlist, tokentx)
Response fields · 3ShowHide
status
"1" if data was returned, "0" otherwise (an error or an empty result)
message
"OK" on success, or an error description such as NOTOK
result
Depends on the action: balance in wei (balance); array of transactions with hash, from, to, value, timeStamp, blockNumber (txlist, tokentx, which adds tokenName, tokenSymbol, tokenDecimal); array with SourceCode, ABI, ContractName, Proxy (getsourcecode); array with contractAddress, contractCreator, txHash (getcontractcreation); object with isError and errDescription (getstatus); resolved address (forwardresolve)
curl 'https://api.etherscan.io/v2/api?chainid=1&module=account&action=balance&apikey=YOUR_API_KEY'{
"status": "1",
"message": "OK",
"result": "172774397764084972158218"
}