查询代币转帐详情#

获取链上指定代币的转账详情。

请求路径#

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

请求参数#

参数名类型是否必须描述
chainShortNameString公链缩写符号,例如 XLAYER
tokenContractAddressString代币合约地址
maxAmountString筛选交易数量区间,最大数量
minAmountString筛选交易数量区间,最小数量
pageString页码
limitString返回条数,默认返回最近的20条,最多100条

响应参数#

参数名类型描述
pageString当前页码
limitString当前页共多少条数据
totalPageString总共多少页
chainFullNameString公链全称,例如:X Layer
chainShortNameString公链缩写符号,例如:XLAYER
totalTransferString代币总转账次数
transactionListArray交易列表
> txidString交易哈希
> blockHashString区块哈希
> heightString交易发生的区块高度
> transactionTimeString交易时间;Unix时间戳的毫秒数格式,如 1597026383085
> toString接收方,多个地址,逗号分隔
> fromString发送方,多个地址,逗号分隔
> isFromContractBolinput地址是否是合约地址
> isToContractBoloutput地址是否是合约地址
> amountString交易数量
> transactionSymbolString交易数量对应的币种
> methodIdString方法
> tokenContractAddressString代币合约地址
> protocolTypeString代币协议类型
> stateString交易状态 成功:success 失败:fail 等待确认:pending
> tokenIdStringNFT代币ID,适用于721和1155代币

请求示例#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/token/transaction-list?chainShortName=xlayer&tokenContractAddress=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": [
        {
            "page": "1",
            "limit": "1",
            "totalPage": "10000",
            "chainFullName": "X Layer",
            "chainShortName": "XLAYER",
            "totalTransfer": "1332602",
            "transactionList": [
                {
                    "txid": "0xfb049c749434287e1064cbfccc800d2c35b35b1b2659b4686a3bc6ad6efd663b",
                    "blockHash": "0xab788f2c037770b00ee5eade14257caa85aa92f2c7b0212329cc0e76661b1d89",
                    "height": "31129117",
                    "transactionTime": "1755489752000",
                    "from": "0xee796e9e58ae7b248ee34b752835b4eda11ec8a5",
                    "to": "0xc71f9e1de80eb505c0cb3bbf90ae6593130e5d25",
                    "isToContract": true,
                    "amount": "500",
                    "transactionSymbol": "USDT",
                    "methodId": "0x751962f6",
                    "tokenContractAddress": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
                    "protocolType": "ERC20",
                    "state": "success",
                    "tokenId": ""
                }
            ]
        }
    ]
}