Etherscan API 查询以太坊地址余额 - 区块链数据开发实战
简介:Etherscan 大多数朋友都比较熟悉了,它是主流以太坊区块浏览器。Etherscan 有面向开发者提供 API 服务以方便其检索以太坊区块链信息。本文示例如何使用 Etherscan API 查询以太坊地址余额。
Introduction: Most of Ethercan’s friends are familiar with it, and it is the mainstream e-Team block browser. Ethercan has an API service for developers to access the e-Team block chain information. This is an example of how to use the Ethercan API query for the e-Teeam address balance.
Etherscan 大多数朋友都比较熟悉了,它是主流以太坊区块浏览器。Etherscan 有面向开发者提供 API 服务以方便其检索以太坊区块链信息。
Most of Ethercan's friends are familiar with it, and it's a mainstream e-Team block browser. Ethercan has an API service for developers to access the e-Team block chain information.
Etherscan API 在没有密钥的情况下,支持每秒最多五次请求。有更多请求需求可以在这里申请密钥:https://etherscancom.freshdesk.com/support/solutions/articles/35000022163-i-need-an-api-key
Anotherscan API supports up to five requests per second in the absence of a key. More requests can be made here for keys:
使用 Etherscan API 查询以太坊地址余额:
Queries with Ethercan API address balance:
语句:
Statement:
https://api.etherscan.io/api?module=account&action=balance&address={填入查询地址}&tag=latest&apikey=YourApiKeyToken
当然,不使用 也是可以查询的:
Of course, non-use is also searchable:
https://api.etherscan.io/api?module=account&action=balance&address={填入查询地址}&tag=latest
Node.js 代码示例:
Example Node.js code:
返回的 JSON 示例:
Example of returned JSON:
Etherscan API 还支持批量查询以太坊地址余额,需要将参数设置为,然后就可以逗号隔开地址进行批量查询了:
Etherscan API also supports batch queries using the balance of the Taiwan address, which needs to be set to parameters, and can then be separated by comma for bulk queries:
语句:
Statement:
https://api.etherscan.io/api?module=account&action=balancemulti&address={查询地址1},{查询地址2},{查询地址3}&tag=latest&apikey=YourApiKeyToken
返回的 JSON 示例:
Example of returned JSON:
Etherscan API 官方文档:https://etherscan.io/apis
Otherscan API Official Documents:
Etherscan API 思维导图:
Anotherscan API mind chart:
我们有一个区块链知识星球,做区块链前沿资料的归纳整理以方便大家检索查询使用,也是国内顶尖区块链技术社区,欢迎感兴趣的朋友加入。如果你对上面内容有疑问,也可以加入知识星球提问我:
We have a block chain knowledge planet, where we can sort out the frontlines of the block chain to facilitate access to the search, and we are the top block chain technology community in the country. Interested friends are welcome to join. If you have questions about it, join the knowledge planet and ask me:
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。