查询指定地址区块内部交易列表#
可以批量查询最多20个地址的内部交易,需要限制查询的开始区块高度以及结束的区块高度,两者差距不能超过10000个区块。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/address/internal-transaction-list-multi请求参数#
| 参数名 | 类型 | 必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 XLAYER |
| address | String | 是 | 地址,最多可以输入20个地址,以,分隔 |
| startBlockHeight | String | 是 | 开始搜索的区块号 |
| endBlockHeight | String | 是 | 结束搜索的区块号 |
| page | String | 否 | 页码 |
| limit | String | 否 | 每页返回的数据条数,默认最小20条,最多100条 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| page | String | 页码 |
| limit | String | 每页返回的数据条数,默认最小20条,最多100条 |
| totalPage | String | 总共的页数 |
| transactionList | Array | 交易列表 |
| > txId | String | 交易哈希 |
| > blockHash | String | 区块哈希 |
| > height | String | 交易发生的区块高度 |
| > transactionTime | String | 交易发生的时间;Unix时间戳的毫秒数格式,如1597026383085 |
| > operation | String | 操作类型 |
| > from | String | 交易发送方的地址,多个地址,以,分隔 |
| > to | String | 交易接受方的地址,多个地址,以,分隔 |
| > isFromContract | Bol | from地址是否是合约地址 |
| > isToContract | Bol | to地址是否是合约地址 |
| > amount | String | 代币数量 |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/address/internal-transaction-list-multi?chainShortName=xlayer&address=0x1e4a5963abfd975d8c9021ce480b42188849d41d,0x74b7f16337b8972027f6196a17a631ac6de26d22&endBlockHeight=18374470&startBlockHeight=18370000&limit=1' \
--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": [
{
"page": "1",
"limit": "1",
"totalPage": "24",
"transactionList": [
{
"txId": "0xb3419122edd3f45387d4cf8603b45003d514fd7ba9c1c5218d88f6d284905693",
"blockHash": "0x1fa9214b1cfaafa7fcb3fcd9200e5ca2bd59e59e76360a67a4fa797707772079",
"height": "18372896",
"transactionTime": "1750114210000",
"operation": "call",
"from": "0xc7545904de04200b3d4676827cdc9977a0d032d5",
"to": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
"isFromContract": true,
"isToContract": true,
"amount": "0"
}
]
}
]
}
