Skip to main content

eth_getBalance

Returns the balance of the account of given address.

Parameters (by position)

Address string required


Block string or string or string required


Show Option 1 Block number string

Block number fields

Block string required

Block number

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


Show Option 2 Block tag string

Block tag fields

earliest: The lowest numbered block the client has available; finalized: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; safe: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; latest: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; pending: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for finalized or safe block MUST be responded to with -39001: Unknown block error

Block string required

earliest: The lowest numbered block the client has available; finalized: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; safe: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; latest: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; pending: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for finalized or safe block MUST be responded to with -39001: Unknown block error

Allowed values: earliest finalized safe latest pending


Show Option 3 Block hash string

Block hash fields

Block string required

Block hash

Match pattern: ^0x[0-9a-f]{64}$


Result

Balance string

hex encoded unsigned integer

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


Examples

eth_getBalance example

Request

{
"params": [
"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"latest"
]
}

Response

"0x1cfe56f3795885980000"