Skip to main content

eth_getBalance

Returns the balance of the account of given address.

Params

(2)

1. Address (required)

string
Match pattern:
^0x[0-9a-fA-F]{40}$

2. Block (required)

(any of)
string
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$

Result

(Balance)
string
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$

Example

Request

await window.ethereum.request({
"method": "eth_getBalance",
"params": [
"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"latest"
]
});

Result

"0x1cfe56f3795885980000"

Params

Address

Block


Request

await window.ethereum.request({
"method": "eth_getBalance",
"params": [
null,
null
]
});