Returns the balance of the account of a given address.
Request Format
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"latest"
],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1cfe56f3795885980000"
}
Parameters
- Address (
address
): The Ethereum address to query. - Block (
BlockNumberOrTagOrHash
): The block number, a special tag (latest
,earliest
,pending
), or a block hash.
Return Value
- Balance (
uint
): The balance of the given address in wei.
Example
Request
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"latest"
],
"id": 1
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1cfe56f3795885980000"
}
Notes
- The balance is returned in wei, which is the smallest unit of ETH.
- To convert wei to ETH, divide the value by
10^18
. - Using
latest
as the block parameter fetches the most recent balance of the address.