eth_getBalance

Returns the balance of the account of given address.

Ethereum.org API Reference

Parameters

  1. DATA, 20 Bytes - address to check for balance. REQUIRED

  2. QUANTITY|TAG - integer block number, or the string "latest", "earliest" or "pending", see the default block parameter REQUIRED

Returns

QUANTITY - integer of the current balance in wei.

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    "latest"
  ],
  "method": "eth_getBalance"
}
'

Response

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x0234c8a3397aab58" // 158972490234375000
}

Last updated