Blockchain Explorer
Actions22
- Account Actions
- Block Actions
- Contract Actions
- Gas Actions
- Stat Actions
- Token Actions
- Transaction Actions
Overview
This node interacts with multiple blockchain networks through their explorer APIs that are compatible with Etherscan. Specifically, the "Token" resource with the "Get Token Balance" operation allows users to query the balance of a specific token held by a blockchain address on various supported networks.
Common scenarios where this node is beneficial include:
- Checking the token balance of a wallet address for portfolio tracking.
- Verifying token holdings before executing transactions or smart contract interactions.
- Integrating token balance checks into automated workflows for alerts or reporting.
For example, you can use this node to get the balance of an ERC-20 token on the Ethereum network by providing the wallet address and the token's contract address.
Properties
| Name | Meaning |
|---|---|
| Network | The blockchain network to query. Options: Arbitrum, Avalanche, Binance Smart Chain, Celo, Cronos, Ethereum, Fantom, Moonbeam, Optimism, Polygon. Default is Ethereum. |
| Address | The blockchain address (wallet) whose token balance you want to retrieve. |
| Contract Address | The contract address of the token (e.g., ERC-20 token contract) to query the balance for. |
Output
The output JSON contains the following fields:
network: The blockchain network queried.resource: The resource type, here always"token".operation: The operation performed, here"getTokenBalance".- Other fields returned by the blockchain explorer API response, typically including:
status: Status code of the API response.message: Message from the API (e.g., "OK" if successful).result: The actual token balance data as returned by the API, usually a string representing the balance in the smallest token unit (like wei for Ethereum tokens).
If the API call fails, the node throws an error unless configured to continue on failure, in which case the output will contain an error field with the error message.
The node does not output binary data.
Dependencies
- Requires an API key credential for accessing the blockchain explorer API service.
- Supports multiple blockchain networks via their respective explorer APIs.
- Uses Axios HTTP client internally to make API requests.
- No additional environment variables are required beyond the API key credential configuration.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication errors.
- Incorrect or malformed blockchain address or contract address inputs may result in API errors or empty results.
- Querying unsupported networks or tokens not indexed by the explorer API may return errors or no data.
Error messages:
API Error: <message>indicates the blockchain explorer API returned an error status. Check the input parameters and API key validity.- Network connectivity issues may cause request failures; ensure the node has internet access.
To resolve errors, verify all input addresses and contract addresses are correct and properly checksummed if required. Confirm the API key is valid and has sufficient permissions.