查询地址内部交易列表#
获取地址相关的内部交易列表。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/address/internal-transaction-list请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 XLAYER |
| address | String | 是 | 地址 |
| startBlockHeight | String | 否 | 开始区块高度 |
| endBlockHeight | String | 否 | 最终区块高度 |
| isFromOrTo | String | 否 | from,筛选from地址为查询地址的交易;to,筛选to地址为查询地址的交易 |
| page | String | 否 | 页码,默认返回第一页 |
| limit | String | 否 | 返回条数,默认返回最近的20条,最多100条 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| page | String | 当前页码 |
| limit | String | 当前页共多少条数据 |
| totalPage | String | 总共多少页 |
| transactionList | Array | 交易列表 |
| > txId | String | 交易哈希 |
| > operation | String | 操作类型 |
| > blockHash | String | 区块哈希 |
| > height | String | 交易发生的区块 |
| > transactionTime | String | 交易时间;Unix时间戳的毫秒数格式,如 1597026383085 |
| > from | String | 发送方地址 |
| > to | String | 接收方地址 |
| > isFromContract | Bol | From地址是否是合约地址 |
| > isToContract | Bol | To地址是否是合约地址 |
| > amount | String | 交易数量 |
| > state | String | 交易状态 success 成功 fail 失败 |
| > symbol | String | 交易数量对应的币种 |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/address/internal-transaction-list?chainShortName=xlayer&address=0x1e4a5963abfd975d8c9021ce480b42188849d41d&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": [
{
"limit": "1",
"page": "1",
"totalPage": "10000",
"transactionList": [
{
"txId": "0x06eadc91e56112be1ea348fa61fc58b5aa4637dd128d9b823a876340d78157df",
"operation": "call",
"blockHash": "0xaebfc9302cce84b17cc14b6a865b7ee452ecfc58d1bd6e01d3a512a2d8878bae",
"height": "31276541",
"transactionTime": "1755569401000",
"from": "0x8869230d573bc68446d4a4a3e08ff93a5d59e797",
"to": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
"isFromContract": true,
"isToContract": true,
"amount": "0",
"symbol": "OKB",
"state": "success"
}
]
}
]
}
