Etherscan API Chinese document account

Time:2019-10-18

Link to the original text of this article
Click here to get the Chinese document of Etherscan API (full version)
The layout of the whole content is better, and readers are recommended to read it.

Account

API related to account and address. Please refer to Etherscan API Convention for parameter description of interface, which is not separately described in the document.

Get single account balance

Translator notes:
    In English, "balance" is translated as "amount", which is often called "balance" by translators.
    Account number and address mostly refer to the same meaning.

Interface:

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

Return:

{
    status: "1",
    message: "OK",
    result: "40807178566070000000000"
}

Explain:

The unit of balance is the smallest unitwei, more unit conversions can be read: Ethernet unit conversions

Request the sample URL. Click to view the effect in the browser.

Get multiple account balances

Interface:

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

Use,To split addresses, request up to 20 accounts at a time.

Return:

{
status: "1",
message: "OK",
result: [
{
account: "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
balance: "40807178566070000000000"
},
{
account: "0x63a9975ba31b0b9626b34300f7f627147df1f526",
balance: "332567136222827062478"
}
]
}

Request sample URL

Get address (general) transaction list

Interface:

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

Optional parameters:startblockendblocksort

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"
    }]
}

Explain:

isError: 0 = right, 1 = wrong
Return up to 10000 recent transactions

Refer to Ethereum design and implementation terminology for the keywords appearing in the return field.

Request sample URL

You can also use paging. For parameter descriptions, please refer to the Etherscan API convention, paging request sample URL.

Click to get the Chinese document of Etherscan API (full version)

Sketch Map:

Recommended documents:

Solid Chinese document (full version)
Chinese documents of ethers.js (full version)
Web3.js Chinese document (full version)
Truffle Chinese document (full version)

Recommended Today

Single and multiple buttons are styled with pictures

I’ve always seen people asking how to style and enlarge the buttons of radio buttons and multi buttons? Let’s share an example I did. 1. First make the button into a picture  2.html page Copy code The code is as follows: <!DOCTYPE HTML> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <script type=”text/javascript” src=”jquery-1.10.2.min.js”></script> <script type=”text/javascript”> […]