Blockchain Explorer icon

Blockchain Explorer

Interact with multiple blockchain networks via their explorer APIs (Etherscan-compatible)

Overview

This node interacts with multiple blockchain networks through their explorer APIs that are compatible with Etherscan. Specifically, for the Account - Get Balance operation, it retrieves the native token balance of a single blockchain address on a selected network.

Common scenarios where this node is useful include:

  • Checking the current balance of an Ethereum or other supported blockchain address.
  • Monitoring wallet balances in automated workflows.
  • Integrating balance checks into larger blockchain data processing pipelines.

For example, you can use this node to query the balance of an Ethereum address on the Polygon network or check the balance of a Binance Smart Chain address, all within an n8n workflow.

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 (e.g., wallet address) whose native token balance you want to retrieve. Must be a valid address string starting with "0x...".

Output

The output JSON contains the following fields:

  • network: The blockchain network queried (e.g., "ethereum").
  • resource: The resource type, here always "account".
  • operation: The operation performed, here "getBalance".
  • Other fields returned by the blockchain explorer API, typically including:
    • status: API response status ("1" for success).
    • message: Response message ("OK" if successful).
    • result: The balance value as a string, usually representing the balance in the smallest unit (like wei for Ethereum).

Example output JSON snippet:

{
  "network": "ethereum",
  "resource": "account",
  "operation": "getBalance",
  "status": "1",
  "message": "OK",
  "result": "1234567890000000000"
}

If the API returns an error, the node will throw an error unless configured to continue on fail, in which case the output will contain an error field with the error message.

This node does not output binary data.

Dependencies

  • Requires an API key credential for the blockchain explorer service compatible with Etherscan APIs.
  • The node uses the Axios HTTP client internally to make requests.
  • No additional environment variables are required beyond the API key credential.
  • Supported blockchain networks include Ethereum and several EVM-compatible chains like Polygon, Binance Smart Chain, Avalanche, etc.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication errors.
    • Incorrect or malformed blockchain address input may result in API errors.
    • Querying unsupported networks or addresses may return errors or empty results.
    • Rate limiting by the blockchain explorer API if too many requests are made in a short time.
  • Error messages:

    • API Error: <message> indicates the blockchain explorer API returned an error. Check the address format, network selection, and API key validity.
    • Network or connectivity errors from Axios may occur; ensure internet access and correct base URL configuration.
  • To resolve errors:

    • Verify the API key credential is correctly set up.
    • Confirm the blockchain address is valid and corresponds to the selected network.
    • Check the network option matches the blockchain of the address.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.

Links and References

Discussion