Vývojářský portál
Motiv

Batch Get Internal Transactions By Hash#

This allows for querying internal transactions of up to 20 transaction at once.

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g. XLAYER
txIdStringYesTransaction hash, multiple transactions separated by , Maximum 20 txIds
pageStringNoPage
limitStringNoThe number of results returned per request

Response Parameters#

ParameterTypeDescription
pageStringCurrent page number
limitStringThe amount of data
totalPageStringTotal number of pages
internalTransactionDetailsArrayInternal transaction details
> txIdStringTransaction hash
> heightStringBlock height of the transaction
> transactionTimeStringTransaction time
> operationStringOperation type
> fromStringSender address
> toStringRecipient address
> isFromContractBolIs the From address a contract address
> isToContractBolIs the To address a contract address
> amountStringTransaction amount

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/transaction/internal-transaction-multi?chainShortName=xlayer&txId=0x1af59bfbca54ad5ed218b22916c311ea32093a648f45f1ff2c01bc28c5554b6f&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": "16",
            "transactionList": [
                {
                    "txId": "0x1af59bfbca54ad5ed218b22916c311ea32093a648f45f1ff2c01bc28c5554b6f",
                    "blockHash": "0xe4e63daf5828275b9ddf278220ceaae6e533d504201d7279702bb03e51df55b7",
                    "height": "31277273",
                    "transactionTime": "1755569805000",
                    "operation": "staticcall",
                    "from": "0x69c236e021f5775b0d0328ded5eac708e3b869df",
                    "to": "0xc71f9e1de80eb505c0cb3bbf90ae6593130e5d25",
                    "isFromContract": true,
                    "isToContract": true,
                    "amount": "0"
                }
            ]
        }
    ]
}