account/balance - 获取指定地址的余额
使用account模块的balance方法获取指定以太坊地址的余额。
API调用
GET|POST /api
查询|表单参数:
- module: account
- action: balance
- address:要查询余额的以太坊地址
- tag:要查询哪个区块时的余额,latest表示最新区块
- apiKey:Etherscan API密钥
API返回结果
返回结果为一个JSON对象,主要字段如下:
- status:状态码,1为成功
- message:调用描述信息,OK为成功
- result:调用执行结果,表示所查询地址的以太币余额,单位:wei
示例调用
以curl为例的调用代码如下,或者直接点击这里查看浏览器中的运行结果:
$ curl https://api.etherscan.io/api?module=account&action=balance&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae&tag=latest&apikey=YourApiKeyToken
返回结果:
{
status: "1",
message: "OK",
result: "40807178566070000000000"
}