eth_getBalance method
Returns the balance of an account with a given address
Parameters
DATA
, 20 Bytes - address to check for the balance.QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
, see the default block parameter
If the Node is Full Archive, then it's possible to query for the balance at a certain block height.
Returns
QUANTITY
- integer of the current balance in wei.
Example
// Request
curl -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xBf727B60eE5fC8F1a5912068bfb171A59D5DB3c1", "0xf537a"] ,"id":32}' https://bsc-api.bwarelabs.com/<your-endpoint-id>
// Response
{
"jsonrpc": "2.0",
"id": 32,
"result": "0x13d1c2ff9f6800"
}
Last updated
Was this helpful?