Ontwikkelaarsportaal
Thema

Get Transaction List#

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

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, XLAYER.
blockHashStringNoBlock hash
heightStringNoBlock height
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
transactionListArrayTransaction list
> txidStringTransaction hash
> blockHashStringBlock hash
> heightStringBlock height of the transaction
> transactionTimeStringThe Unix timestamp of the transaction time, in milliseconds format, e.g., 1597026383085.
> inputStringToken arrival address
> outputStringToken transfer out address
> isFromContractBolIs the input address a contract address
> isToContractBolIs the output address a contract address
> amountStringTransaction amount
> transactionSymbolStringToken symbol of the transaction
> txfeeStringTransaction fee
> methodIdStringMethod ID
> transactionTypeStringTransaction type 0:original transaction type 1:EIP2930 2:EIP1559
> stateStringTransaction state success fail pending

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/transaction/transaction-list?limit=1&chainShortName=xlayer' \
--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",
            "transactionList": [
                {
                    "txid": "0x7db1728b0825fe747a0fbea9e5c5a07fec01e77c8684a6e2df912db408189dc7",
                    "blockHash": "0x6af529ac10583632da1ad9a74ed5f303c52c7ed98b3d35590c8be9f3d1ace7f9",
                    "height": "31136625",
                    "transactionTime": "1755494041000",
                    "input": "0xf6ead32d92fb5ad6b99749f9083e20d58bdcdcdc",
                    "output": "0x99594db61870ef0bc825547b242114488e32521e",
                    "isInputContract": false,
                    "isOutputContract": true,
                    "amount": "0",
                    "transactionSymbol": "OKB",
                    "txfee": "0.000277729000277729",
                    "methodId": "0x786809ad",
                    "transactionType": "0",
                    "state": "success"
                }
            ]
        }
    ]
}