本文原文链接

点击这里获取Etherscan API 中文文档(完整版)

完整内容排版更好,推荐读者前往阅读。

账号(Account)

账号及地址相关的 API,接口的参数说明请参考Etherscan API 约定, 文档中不单独说明。

获取单个账号余额

  1. 译者注:
  2. 英文 `balance` 有人翻译为`金额`,译者习惯称为`余额`
  3. 账号和地址大部分也是指一个意思。

接口:

  1. /api?module=account&action=balance&address=0x&tag=latest&apikey=YourApiKeyToken

返回:

  1. {
  2. status: "1",
  3. message: "OK",
  4. result: "40807178566070000000000"
  5. }

说明:

余额的单位都是最小单位wei, 更多单位换算可阅读:以太单位换算

请求样例URL,点击可在浏览器查看效果。

获取多个账号余额

接口:

  1. /api?module=account&action=balancemulti&address=0xabc,0x63..,0x198..&tag=latest&apikey=YourApiKeyToken

使用,来分割地址,一次请求最多20个账号。

返回:

  1. {
  2. status: "1",
  3. message: "OK",
  4. result: [
  5. {
  6. account: "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
  7. balance: "40807178566070000000000"
  8. },
  9. {
  10. account: "0x63a9975ba31b0b9626b34300f7f627147df1f526",
  11. balance: "332567136222827062478"
  12. }
  13. ]
  14. }

请求样例URL

获取地址(普通)交易列表

接口:

  1. /api?module=account&action=txlist&address=&apikey=YourApiKeyToken

可选参数:startblockendblocksort

返回:

  1. {
  2. "status": "1",
  3. "message": "OK",
  4. "result": [{
  5. "blockNumber": "47884",
  6. "timeStamp": "1438947953",
  7. "hash": "0xad1c27dd8d0329dbc400021d7477b34ac41e84365bd54b45a4019a15deb10c0d",
  8. "nonce": "0",
  9. "blockHash": "0xf2988b9870e092f2898662ccdbc06e0e320a08139e9c6be98d0ce372f8611f22",
  10. "transactionIndex": "0",
  11. "from": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
  12. "to": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2",
  13. "value": "5000000000000000000",
  14. "gas": "23000",
  15. "gasPrice": "400000000000",
  16. "isError": "0",
  17. "txreceipt_status": "",
  18. "input": "0x454e34354139455138",
  19. "contractAddress": "",
  20. "cumulativeGasUsed": "21612",
  21. "gasUsed": "21612",
  22. "confirmations": "7525550"
  23. }]
  24. }

说明:

isError: 0= 没错, 1=出错

最多返回最近的10000个交易

返回字段中出现的关键字可参考以太坊设计与实现-术语

请求样例URL

也可以使用分页,参数说明请参考Etherscan API 约定,分页请求样例URL

点击获取Etherscan API 中文文档(完整版)

示意图:

相关文档推荐:

Solidity 中文文档(完整版)

ethers.js 中文文档(完整版)

Web3.js 中文文档(完整版)

Truffle 中文文档(完整版)

Etherscan API 中文文档-账号的更多相关文章

  1. Etherscan API 中文文档-交易以及检查交易收据状态

    本文原文链接 点击这里获取Etherscan API 中文文档(完整版) 完整内容排版更好,推荐读者前往阅读. 交易(Transaction) 交易相关的 API,接口的参数说明请参考Ethersca ...

  2. Etherscan API 中文文档-智能合约

    本文原文链接 点击这里获取Etherscan API 中文文档(完整版) 完整内容排版更好,推荐读者前往阅读. 智能合约(Contracts) 智能合约相关的 API,接口的参数说明请参考Ethers ...

  3. jQuery 3.1 API中文文档

    jQuery 3.1 API中文文档 一.核心 1.1 核心函数 jQuery([selector,[context]]) 接收一个包含 CSS 选择器的字符串,然后用这个字符串去匹配一组元素. jQ ...

  4. jQuery EasyUI API 中文文档 - ComboGrid 组合表格

    jQuery EasyUI API 中文文档 - ComboGrid 组合表格,需要的朋友可以参考下. 扩展自 $.fn.combo.defaults 和 $.fn.datagrid.defaults ...

  5. jQuery EasyUI API 中文文档 - ValidateBox验证框

    jQuery EasyUI API 中文文档 - ValidateBox验证框,使用jQuery EasyUI的朋友可以参考下.   用 $.fn.validatebox.defaults 重写了 d ...

  6. jQuery EasyUI API 中文文档

    http://www.cnblogs.com/Philoo/tag/jQuery/ 共2页: 1 2 下一页  jQuery EasyUI API 中文文档 - 树表格(TreeGrid) 风流涕淌 ...

  7. jQuery API中文文档

    jQuery API中文文档 http://www.css88.com/jqapi-1.9/category/events/event-handler-attachment/ jQuery UI AP ...

  8. Web3.js API 中文文档

    Web3.js API 中文文档 http://web3.tryblockchain.org/Web3.js-api-refrence.html web3对象提供了所有方法. 示例: //初始化过程 ...

  9. 以太坊智能合约开发,Web3.js API 中文文档 ethereum web3.js入门说明

    以太坊智能合约开发,Web3.js API 中文文档 ethereum web3.js入门说明 为了让你的Ðapp运行上以太坊,一种选择是使用web3.js library提供的web3.对象.底层实 ...

随机推荐

  1. (linux)LED子系统

    数据结构(/include/linux/leds.h) enum led_brightness { LED_OFF = 0, LED_HALF = 127, LED_FULL = 255, }; le ...

  2. nodejs中的子进程,深入解析child_process模块和cluster模块

    Node.js的进程管理   node遵循的是单线程单进程的模式,node的单线程是指js的引擎只有一个实例,且在nodejs的主线程中执行,同时node以事件驱动的方式处理IO等异步操作.node的 ...

  3. C# nunit 单元测试

    1. 引包 nunit.framework.dll

  4. hihocoder #1152 Lucky Substrings 【字符串处理问题】strsub()函数+set集合去重

    #1152 : Lucky Substrings时间限制:10000ms单点时限:1000ms内存限制:256MB描述A string s is LUCKY if and only if the nu ...

  5. 算法(Algorithms)第4版 练习 1.3.25 1.3.24

    代码实现: //1.3.24 /** * remove the node following the node x * (and does nothing if the argument or the ...

  6. HDU 4336 Card Collector:状压 + 期望dp

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4336 题意: 有n种卡片(n <= 20). 对于每一包方便面,里面有卡片i的概率为p[i],可 ...

  7. java 基础 - 反转字符串

    反转字符串 public class Main { public static void main(String[] args) { String newStr= strReverseWithArra ...

  8. Highcharts小数保留两位方法

    tooltip: { valueSuffix: '%', formatter:function(){ return''+this.series.name+' '+Highcharts.numberFo ...

  9. ZOJ1905Power Strings (KMP||后缀数组+RMQ求循环节)

    Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc&quo ...

  10. Idea无法加载主类

    今天重装了下电脑,运行idea发现各种问题. 直接进主题哈, 遇到三种情况 第一种: 首先查看这里是否有多个,只保留当前需要用工程路径.点击P右边的删除即可 删除后 然后运行是否能运行. 如果没有的话 ...