Entwicklerportal
Anzeigemodus

Get Address Transaction List#

Get the transaction list of the chain, only return nearly 10,000 transaction data.

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, XLAYER
addressStringYesAddress
protocolTypeStringNoContract protocol type transaction internal token_20 token_721 token_1155 token_10 trx The default is transaction
tokenContractAddressStringNoToken contract address
startBlockHeightStringNoThe starting block height
endBlockHeightStringNoThe end block height
isFromOrToStringNofrom, filter transactions where the from address is the query address. to, filter transactions where the to address is the query address
pageStringNoPage
limitStringNoThe number of results returned per request. The maximum is 50. The default is 20.

Response Parameters#

ParameterTypeDescription
pageStringCurrent page number
limitStringThe amount of data
totalPageStringTotal number of pages
chainFullNameStringThe full name of the blockchain network, e.g. X Layer
chainShortNameStringThe abbreviated name of the blockchain network, e.g. XLAYER
transactionListsArrayTransaction list
> txIdStringTransaction hash
> blockHashStringBlock hash
> heightStringBlock height
> transactionTimeStringTransaction time. Broadcasting time for pending transactions. Unix timestamp format in milliseconds, e.g. 1597026383085
> fromStringSender address
> toStringRecipient address
> isFromContractBolIs the From address a contract address
> isToContractBolIs the To address a contract address
> amountStringTransaction amount
> transactionSymbolStringTransaction currency
> txFeeStringTransaction Fees
> stateStringTrading state success fail pending
> tokenContractAddressStringToken Contract Address
> challengeStatusStringChallenge period status
> l1OriginHashStringL1 executed transaction hash

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/address/transaction-list?chainShortName=xlayer&address=0x69c236e021f5775b0d0328ded5eac708e3b869df&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'

Response Example#

json
{
    "code": "0",
    "msg": "",
    "data": [
        {
            "page": "1",
            "limit": "1",
            "totalPage": "10000",
            "chainFullName": "X Layer",
            "chainShortName": "XLAYER",
            "transactionLists": [
                {
                    "txId": "0x6bb9fe97af19ba7a3c887b3f96be59031a6d7026fbc1252113753d5aaedf3c6c",
                    "methodId": "0x9871efa4",
                    "blockHash": "0xe3a02cf4636b6f7442e3e5b6c2a8f4400b1f1bb68bc99b742a7c116e61a0f474",
                    "height": "31117930",
                    "transactionTime": "1755483543000",
                    "from": "0xd0f04833849ba63938f3bafefb55646fa642fee9",
                    "to": "0x69c236e021f5775b0d0328ded5eac708e3b869df",
                    "isFromContract": false,
                    "isToContract": true,
                    "amount": "0",
                    "transactionSymbol": "OKB",
                    "txFee": "0.000187223000748892",
                    "state": "fail",
                    "tokenId": "",
                    "tokenContractAddress": "",
                    "challengeStatus": "",
                    "l1OriginHash": ""
                }
            ]
        }
    ]
}