Skip to main content
Returns the ETH balance of an address at a given block.
Flashblocks: Query https://mainnet.base.org with "pending" to read balances updated every ~200ms — before the block seals.

Parameters

string
required
The 20-byte address to query.
string
required
Block number in hex, or "latest", "pending", "safe", "finalized", "earliest". Use "pending" for pre-confirmed balance.

Returns

string
The balance in wei as a hexadecimal string.

Example

Read Balances for Many Addresses

eth_getBalance returns the balance of one address per call. To produce a balance snapshot across a set of addresses, such as every wallet your platform operates:
  1. Keep your own address list. Base has no registry that maps addresses to the organization that controls them, so the list comes from your own records, for example the accounts your wallet or custody provider created for you.
  2. Pin one block number. Read every balance at the same block so the snapshot reflects a single chain state. For reports, use a finalized block.
  3. Batch the reads. Call the Multicall3 preinstall at 0xcA11bde05977b3631167028862bE2a173976CA11 with eth_call at the pinned block. Use getEthBalance(address) for ETH and the token contract’s balanceOf(address) for ERC-20 balances.
To report balances over time, for example a time-weighted average, repeat the snapshot at fixed block intervals. Reading state at older blocks requires a node that retains historical state (an archive node).