查询地址普通交易列表#

获取地址相关的普通交易列表。

请求路径#

GET
https://web3.okx.com/api/v5/xlayer/address/normal-transaction-list

请求参数#

参数名类型是否必须描述
chainShortNameString公链缩写符号,例如 XLAYER
addressString地址
startBlockHeightString开始区块高度
endBlockHeightString最终区块高度
isFromOrToStringfrom,筛选from地址为查询地址的交易;to,筛选to地址为查询地址的交易;
pageString页码,默认返回第一页
limitString返回条数,默认返回最近的20条,最多100条

响应参数#

参数名类型描述
pageString当前页码
limitString当前页共多少条数据
totalPageString总共多少页
transactionListArray交易列表
> txIdString交易哈希
> methodIdString方法
> nonceString发起者地址发起的第几笔交易
> gasPriceStringgas价格
> gasLimitStringgas限额
> gasUsedStringgas消耗
> blockHashString区块哈希
> heightString交易发生的区块
> transactionTimeString交易时间;Unix时间戳的毫秒数格式,如 1597026383085
> fromString发送方地址
> toString接收方地址
> isFromContractBolFrom地址是否是合约地址
> isToContractBolTo地址是否是合约地址
> amountString交易数量
> symbolString交易数量对应的币种
> txFeeString手续费
> stateString交易状态 success 成功 fail 失败 pending 等待确认
> transactionTypeString交易类型 0:原始交易类型 1:EIP2930 2:EIP1559

请求示例#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/address/normal-transaction-list?chainShortName=xlayer&limit=1&address=0x69c236e021f5775b0d0328ded5eac708e3b869df' \
--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": "0xac13f71830c237aaae8debab0a37ed03c5baf3525c76d5fd2dcb3a20ca201ae2",
                    "methodId": "0x9871efa4",
                    "nonce": "7",
                    "gasPrice": "1017500300",
                    "gasLimit": "456747",
                    "gasUsed": "129549",
                    "blockHash": "0x0bfa9e97961084aa399288c81ac03e46bfc9d055ae38598ffb8e060af0c420f6",
                    "height": "30664630",
                    "transactionTime": "1755240660000",
                    "from": "0x7b63a9eaaa7f1e651f3dceea1c9935fab217624a",
                    "to": "0x69c236e021f5775b0d0328ded5eac708e3b869df",
                    "isFromContract": false,
                    "isToContract": true,
                    "amount": "0.05",
                    "symbol": "OKB",
                    "txFee": "0.0001318161463647",
                    "state": "success",
                    "transactionType": "0"
                }
            ]
        }
    ]
}