eth_getBalance
Returns the balance of the account of a given address.
Last updated
Returns the balance of the account of a given address.
Last updated
DATA
, 20 Bytes - address to check for balance.
QUANTITY|TAG
- integer block number, or the string "latest"
, "earliest"
or "pending"
, see the .
QUANTITY
- hex value of the current ETH balance for the given address, measured in wei.
To convert the hex string response, measured in Wei to a decimal value measured in ETH we need to complete two steps:
Convert the hex response into decimal (Wei)
Convert the Wei decimal into ETH decimal (10^18 wei = 1 eth)
Depending on what library or language you are using, there are several options here.