proxy/eth_getBlockTransactionCountByNumber - 获取指定编号区块的交易数量
使用proxy模块的eth_getBlockTransactionCountByNumer方法获取指定编号区块 的交易数量。
API调用
GET|POST /api
查询|表单参数:
- module:proxy
- action:eth_getUncleByBlockNumberAndIndex
- tag:区块编号
- apikey:etherscan API密钥
API返回结果
返回结果为一个JSON对象,主要字段如下:
- jsonrpc:RPC版本号,2.0
- id:RPC请求编号
- result:调用结果,表示该区块包含的交易数量
示例代码
以curl为例的调用代码如下,也可以点击这里查看浏览器中的运行结果:
~$ curl https://api.etherscan.io/api?module=proxy&action=eth_getBlockTransactionCountByNumber&tag=0x10FB78&apikey=YourApiKeyToken
返回结果如下:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3"
}