Vývojářský portál
Motiv

Get Unconfirmed Transaction List#

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

Request Path#

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

Request Parameters#

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

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/transaction/unconfirmed-transaction-list?chainShortName=xlayer&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": "0",
            "chainFullName": "X Layer",
            "chainShortName": "XLAYER",
            "transactionList": []
        }
    ]
}