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โ
| Endpoint | Description | Price |
|---|---|---|
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โ
| Endpoint | Description | Price |
|---|---|---|
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โ
| Endpoint | Description | Price |
|---|---|---|
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โ
| Param | Values | Default |
|---|---|---|
closest | before, after | before |
Stats Moduleโ
| Endpoint | Description | Price |
|---|---|---|
GET /api/etherscan/stats/ethsupply | Total ETH supply | $0.005 |
GET /api/etherscan/stats/eth2supply | ETH2 staking, burnt fees, withdrawals | $0.005 |
GET /api/etherscan/stats/ethprice | ETH/USD and ETH/BTC prices | $0.005 |
GET /api/etherscan/stats/nodecount | Ethereum node count | $0.005 |
Token Moduleโ
| Endpoint | Description | Price |
|---|---|---|
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โ
| Param | Type | Default | Max |
|---|---|---|---|
page | number | 1 | โ |
offset | number | 20 | 100 |
contractaddress | string | โ | Filter by token |
Error Codesโ
| Code | Description |
|---|---|
NOT_VERIFIED | Contract source not verified on Etherscan |
ETHERSCAN_ERROR | API error |
Relatedโ
- Etherscan Tools Tutorial โ Full guide
- Contract Verification โ Security checks