eth_getBalance
This method is essential for determining an account's available funds
Request
Examples
curl --request POST \
--url https://rpc.xone.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [
"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
"latest"
],
"method": "eth_getBalance"
}
'
Response
200 OK
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Request params
Name | Type | Description |
---|---|---|
id | integer | Request identifier |
jsonrpc | string | JSON-RPC version |
method | string | API method name |
Parameters | object | |
address | string | The address to query the balance for. |
blockNumber | string | The block number or tag ("latest", "earliest", "pending") at which to get the balance. |
Response
200
Name | Type | Description |
---|---|---|
Parameters | object | |
id | integer | |
jsonrpc | string | |
result | string | The balance of the account in wei, returned as a hexadecimal string. |