eth_getBalance - Ethereum
Shows a balance of an account on the chosen address in wei
How to Use the eth_getBalance Method
Parameters
DATA, 20 Bytes - an address which balance you are checking.
QUANTITY|TAG - the string "latest", "earliest" or "pending", or an integer block number.
What you receive
QUANTITY - the chosen address’ balance in wei presented as an integer.
Sample
Here is a typical appliance example.
Call
curl https://eth-mainnet.rpcfast.com/?api_key=<key> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":0}'
Sample
{
"jsonrpc": "2.0",
"id": 0,
"result": "0x7c2562030800"
}
Last updated