Portal deweloperski
Motyw

Get Normal Transaction List By Address#

Get a list of common transactions associated with an address and return only the last year or one year back from the time of the last transaction.

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, XLAYER
addressStringYesAddress
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
transactionListArrayTransaction list
> txIdStringTransaction hash
> blockHashStringBlock hash
> heightStringBlock height
> transactionTimeStringThe Unix timestamp of the transaction time, in milliseconds format, e.g., 1597026383085.
> fromStringSender address
> toStringRecipient address
> isFromContractBolIs the From address a contract address
> isToContractBolIs the To address a contract address
> amountStringTransaction amount
> stateStringtrading state success fail pending
> methodIdStringMethod ID
> symbolStringSymbol of the token
> nonceStringThe number of transactions initiated by the sender's address
> gasUsedStringActual amount of gas used
> gasLimitStringGas limit
> gasPriceStringGas price
> txFeeStringTransaction fees
> stateStringTransaction status success fail pending
> transactionTypeStringTransaction type 0:original transaction 1:EIP2930 2:EIP1559

Request Example#

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'

Response Example#

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"
                }
            ]
        }
    ]
}