💎 Ethereum
eth_getBalance

eth_getBalance RPC Method

The eth_getBalance method returns the balance (in wei) of the specified account address at the latest block.

⚠️

eth_getBalance only returns the balance of the native chain currency (ex: ETH for Ethereum or Matic for Polygon) and does not include any ERC20 token balances.

Parameters

address- 20 bytes. The address of the account to retrieve the balance of.

blockNumber or tag - The string "latest", "earliest", "pending", "safe" or "finalized", or an hexadecimal block number.

"Safe" and "finalized" are only availible on Ethereum and Arbitrum One chains. Read block parameter description in Ethereum documentation (opens in a new tab).

Returns

Balance - The chosen address’ balance in wei as an integer.

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

💡

Confusing? Ask blockchain developers in Chainnodes Telegram Chat (opens in a new tab)

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
  • You can use a different supported network by replacing mainnet
curl https://mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5", "latest"],"id":1}'

Body

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x19451085df7bc276d"
}