Skip to main content

eth_getBalance RPC Method

Returns the balance of given account address in wei.

Updated on
Dec 11, 2024

eth_getBalance RPC Method

Parameters

address
string
REQUIRED
The address (20 bytes) to check for balance
blockNumber/tag
string
REQUIRED
The block number in hexadecimal format or the tags (latest, earliest, pending, safe or finalized)

Returns

result
string
The A0GI balance of the specified address in hexadecimal value
Request
1
curl https://docs-demo.0g-newton.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"eth_getBalance","params":["0xb812653380ce58345a045B2801B937A42fa3fc0E", "latest"],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free