eth_getBalance
The eth_getBalance method returns the balance of an account in wei for a given address at a specified block. This is one of the most commonly used methods for checking how much ETH an account holds.
The method allows querying historical balances by specifying different block numbers, making it useful for tracking balance changes over time and building account history features. Developers can use this to display wallet balances, verify payment receipts, monitor account activity, and analyze balance trends. The ability to query balances at specific block heights enables historical analysis and accurate state reconstruction at any point in blockchain history.
Parameters
parameter | type | description |
|---|---|---|
address | string (required) | The Ethereum address to check balance for (20-byte hex string with 0x prefix, e.g., '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb') |
blockParameter | string (required) | Block number in hex format (e.g., '0x10d4f') or one of the string tags: 'latest' for the most recent block, 'earliest' for the genesis block, or 'pending' for pending state including pending transactions |
Return Object
field | type | description |
|---|---|---|
result | string | The account balance in wei (the smallest denomination of ETH, where 1 ETH = 10^18 wei) encoded as a hexadecimal string. To convert to ETH, divide the decimal value by 1,000,000,000,000,000,000. |
Request Example
Request
Response Example
Response