Skip to main content

Etherscan

Access verified contract data, transaction status, block info, and token transfers via Etherscan V2 API.

Full Tutorial

See Etherscan Tools Tutorial for comprehensive examples.

Contract Moduleโ€‹

EndpointDescriptionPrice
GET /api/etherscan/contract/abi/{address}Get verified contract ABI$0.02
GET /api/etherscan/contract/source/{address}Get contract source code$0.02
GET /api/etherscan/contract/creation/{address}Get creator & deploy TX (up to 5)$0.01

Example: Get Contract ABIโ€‹

curl https://api.web3identity.com/api/etherscan/contract/abi/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
{
"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"abi": [{"type": "function", "name": "deposit"}, ...],
"verified": true,
"source": "etherscan"
}

Example: Get Source Codeโ€‹

curl https://api.web3identity.com/api/etherscan/contract/source/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

Returns contract name, compiler version, optimization settings, proxy info, and license.


Transaction Moduleโ€‹

EndpointDescriptionPrice
GET /api/etherscan/tx/status/{txhash}Execution status (isError)$0.01
GET /api/etherscan/tx/receipt/{txhash}Receipt status (success/failed)$0.01

Example: Check Transaction Statusโ€‹

curl https://api.web3identity.com/api/etherscan/tx/status/0x15f8e5ea...
{
"txHash": "0x15f8e5ea...",
"isError": false,
"errDescription": null,
"source": "etherscan"
}

Block Moduleโ€‹

EndpointDescriptionPrice
GET /api/etherscan/block/reward/{blockno}Block reward & miner$0.01
GET /api/etherscan/block/countdown/{blockno}Estimate time to future block$0.01
GET /api/etherscan/block/by-time/{timestamp}Block number at timestamp$0.01

Query Parameters for by-timeโ€‹

ParamValuesDefault
closestbefore, afterbefore

Stats Moduleโ€‹

EndpointDescriptionPrice
GET /api/etherscan/stats/ethsupplyTotal ETH supply$0.005
GET /api/etherscan/stats/eth2supplyETH2 staking, burnt fees, withdrawals$0.005
GET /api/etherscan/stats/ethpriceETH/USD and ETH/BTC prices$0.005
GET /api/etherscan/stats/nodecountEthereum node count$0.005

Token Moduleโ€‹

EndpointDescriptionPrice
GET /api/etherscan/token/transfers/{address}ERC20 token transfers$0.02
GET /api/etherscan/token/balance/{address}/{contract}Token balance$0.01
GET /api/etherscan/nft/transfers/{address}ERC721 (NFT) transfers$0.02
GET /api/etherscan/erc1155/transfers/{address}ERC1155 transfers$0.02

Query Parametersโ€‹

ParamTypeDefaultMax
pagenumber1โ€”
offsetnumber20100
contractaddressstringโ€”Filter by token

Error Codesโ€‹

CodeDescription
NOT_VERIFIEDContract source not verified on Etherscan
ETHERSCAN_ERRORAPI error