获取 EVM 地址基本信息#
查询 EVM 地址的基本信息,包括本链币资产、交易次数、首末次交易时间,以及合约地址的创建与调用相关信息。仅支持 EVM 链;若地址无链上记录,data 返回空数组。
支持的链:见获取地址 API 支持的链(apiName:information-evm)。
请求地址#
GET
https://web3.okx.com/api/v6/explorer/address/information-evm请求参数#
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| chainIndex | String | 是 | 链唯一标识,如 ETH 为 1;仅支持 EVM 链;支持范围见获取地址 API 支持的链 |
| address | String | 是 | EVM 地址 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| address | String | 地址 |
| isValidator | Boolean | 是否为验证者节点 |
| balance | String | 本链币资产 |
| balanceSymbol | String | 本链币余额币种(例如 Gnosis 链返回 ETH) |
| transactionCount | String | 该地址交易次数 |
| firstTransactionTime | String | 该地址发生第一笔交易时间 |
| lastTransactionTime | String | 该地址最近一次发生交易时间 |
| contractAddress | Boolean | 是否为合约地址(用于判断是否为 EOA) |
| createContractAddress | String | 创建合约的地址;非合约地址时为空串 |
| createContractTransactionHash | String | 创建合约的交易哈希;非合约地址时为空串 |
| contractCorrespondingToken | String | 合约对应代币;非合约地址时为空串 |
| contractCalls | String | 合约调用次数;非合约地址时为空串 |
| contractCallingAddresses | String | 合约调用地址数;非合约地址时为空串 |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/address/information-evm?chainIndex=1&address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
响应示例#
json
{
"code": "0",
"msg": "",
"data": [
{
"address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"isValidator": false,
"balance": "744.5387964072138",
"balanceSymbol": "ETH",
"transactionCount": "1568",
"firstTransactionTime": "1438922865000",
"lastTransactionTime": "1753690000000",
"contractAddress": false,
"createContractAddress": "",
"createContractTransactionHash": "",
"contractCorrespondingToken": "",
"contractCalls": "",
"contractCallingAddresses": ""
}
]
}
