eth_getBalance
返回指定地址账户的余额。
参数
DATA
- 20字节,要检查余额的地址QUANTITY|TAG
- 整数块编号,或者字符串"latest", "earliest" 或 "pending"
params: [
'0x407d73d8a49eeb85d32cf465507dd71d507100c1',
'latest'
]
返回值
QUANTITY
- 当前余额,单位:wei
示例代码
请求:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"],"id":1}'
响应:
{
"id":1,
"jsonrpc": "2.0",
"result": "0x0234c8a3397aab58" // 158972490234375000
}