Skip to main content

eth_getBalance

Returns the balance of the account of given address in wei.

Params

  1. Address: string. The address to get the balance of.
  2. BlockNumber: string (optional). The block number to get the balance at. If omitted, the latest block is used.

Result

Returns a Promise that resolves with a string containing the hexadecimal balance of the account in wei.

Example

const balance = await provider.request({
method: 'eth_getBalance',
params: [
'0x...',
'latest'
]
});
console.log(balance); // ['0x...']