This article original link
click here for Etherscan API Chinese document (full version)
complete the content layout better, we recommend the reader go read.
Account (Account)
Account number and address related API, the parameters of the interface description please refer to Etherscan API agreement , the document does not explain alone.
Getting individual account balances
``note::<br/>译者注:<br/>英文
balance 有人翻译为
amount ,译者习惯称为
balance '.
Most of the account number and address also refers to a meaning.
接口:
/api?module=account&action=balance&address=0x&tag=latest&apikey=YourApiKeyToken
返回:
```js
{
status: "1",
message: "OK",
result: "40807178566070000000000"
}
Description:
The balance of the unit is the smallest unit wei
, unit conversion can read more: Ethernet unit conversion
Sample requests the URL of , click to view the results in the browser.
Acquire multiple account balances
interface:
/api?module=account&action=balancemulti&address=0xabc,0x63..,0x198..&tag=latest&apikey=YourApiKeyToken
Use ,
to separate address, a request for up to 20 accounts.
return:
{
status: "1",
message: "OK",
result: [
{
account: "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
balance: "40807178566070000000000"
},
{
account: "0x63a9975ba31b0b9626b34300f7f627147df1f526",
balance: "332567136222827062478"
}
]
}
Request Sample URL
Get the address of (ordinary) transaction list
interface:
/api?module=account&action=txlist&address=&apikey=YourApiKeyToken
Optional startblock
parameters: endblock
, ,sort
return:
{
"status": "1",
"message": "OK",
"result": [{
"blockNumber": "47884",
"timeStamp": "1438947953",
"hash": "0xad1c27dd8d0329dbc400021d7477b34ac41e84365bd54b45a4019a15deb10c0d",
"nonce": "0",
"blockHash": "0xf2988b9870e092f2898662ccdbc06e0e320a08139e9c6be98d0ce372f8611f22",
"transactionIndex": "0",
"from": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"to": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2",
"value": "5000000000000000000",
"gas": "23000",
"gasPrice": "400000000000",
"isError": "0",
"txreceipt_status": "",
"input": "0x454e34354139455138",
"contractAddress": "",
"cumulativeGasUsed": "21612",
"gasUsed": "21612",
"confirmations": "7525550"
}]
}
Description:
the isError : 0 = Yes, 1 = error
return the most recent transaction of 10,000
Keyword returns appears in the field can refer to an Ethernet Square Design and implementation - terminology .
Request Sample URL
Tab may be used, refer to the parameter description Etherscan API convention , examples paging request URL
Click for Etherscan API Chinese document (full version)
schematic diagram:
Related documents Recommended:
Solidity Chinese document (full version)
ethers.js Chinese document (full version)
Web3.js Chinese document (full version)
Truffle Chinese document (full version)