eth_getBalance RPC Method
MegaETH nodes use a ~15-day pruning window for historical state data. Querying a balance at a block older than ~15 days (1,296,064 blocks) may fail because the required account history has been pruned. For more details, see the MegaETH Pruning Policy.
Parameters
address
string
REQUIRED
Loading...
blockNumber/tag
string
REQUIRED
Loading...
Returns
result
string
Loading...
Request
1curl -X POST "https://docs-demo.megaeth-mainnet.quiknode.pro/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "eth_getBalance",6"params": [7"0x0000000000000000000000000000000000000000",8"latest"9],10"id": 111}'
1curl -X POST "https://docs-demo.megaeth-mainnet.quiknode.pro/" \2-H "Content-Type: application/json" \3-d '{4"jsonrpc": "2.0",5"method": "eth_getBalance",6"params": [7"0x0000000000000000000000000000000000000000",8"latest"9],10"id": 111}'
Response
1{2"jsonrpc": "2.0",3"result": "0x155c7de375344be00065",4"id": 15}
1{2"jsonrpc": "2.0",3"result": "0x155c7de375344be00065",4"id": 15}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free