Skip to main content

Balance

Retrieves the native cryptocurrency balance of a wallet address on the blockchain network.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Client ID - The client ID from the Create Client node.
  • Wallet Address - The wallet address to check the balance for (e.g., "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb").

Output

  • Balance - The wallet balance in ETH (or the native currency of the chain), formatted as a decimal string.

Options

  • Precision - Number of decimal places to include in the balance output (default: 4).

How It Works

The Balance node queries the blockchain for a wallet's native currency balance. When executed, the node:

  1. Validates the Client ID and wallet address
  2. Queries the blockchain for the address's balance in WEI
  3. Converts the balance from WEI to ETH (or native currency)
  4. Formats the result with the specified precision
  5. Returns the balance as a string

Requirements

  • A valid Client ID from the Create Client node
  • A valid wallet address (42 characters starting with "0x")
  • Active network connection

Error Handling

The node will return errors for:

  • Empty or invalid Client ID
  • Client not found (Create Client must be called first)
  • Empty or invalid wallet address
  • Network connection failures
  • RPC endpoint errors

Usage Notes

  • This node retrieves the native currency balance (ETH on Ethereum, MATIC on Polygon, BNB on BSC)
  • For ERC20 token balances, use the ABI Method node with the token's balanceOf function
  • The balance is returned in the native currency unit (ETH), not in WEI
  • Higher precision values show more decimal places but may include rounding errors
  • The balance reflects the confirmed state on the blockchain

Example

Checking ETH balance on Ethereum mainnet:

Inputs:

  • Client ID: 7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b
  • Wallet Address: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb

Options:

  • Precision: 4

Output:

  • Balance: 1.2345 (ETH)

Checking MATIC balance on Polygon:

Inputs:

  • Client ID: a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6
  • Wallet Address: 0x1234567890123456789012345678901234567890

Options:

  • Precision: 6

Output:

  • Balance: 100.500000 (MATIC)

Common Use Cases

Wallet Monitoring: Check wallet balances regularly to ensure sufficient funds for operations.

Payment Verification: Verify that payments have been received before proceeding with automation.

Balance Alerts: Trigger notifications when balances fall below a threshold.

Multi-Wallet Management: Monitor balances across multiple wallets for treasury management.

Pre-Transaction Validation: Check that a wallet has sufficient balance before attempting a transaction.

tip

For more precise balance checks, increase the precision value. For display purposes, 4-6 decimal places are usually sufficient.

info

This node only checks native cryptocurrency balances. To check ERC20 token balances, you need to call the token contract's balanceOf method using ABI Method and Call nodes.

Conversion Reference

  • 1 ETH = 1,000,000,000,000,000,000 WEI (10^18)
  • 1 ETH = 1,000,000,000 GWEI (10^9)
  • Balance node automatically converts WEI to ETH