eth_getBalance RPC Method

Retrieves the native token balance for a specified account.

Parameters#

stringrequired

Account address, 20 bytes, hex-encoded.

stringrequired

Block identifier — a tag (latest, safe, finalized, pending) or a 32-byte block hash.

Result#

string - The native token balance of the account in wei, hex-encoded.

Code sample#

{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "latest"
  ],
  "id": 1
}

Response#

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0"
}
Try It