Get Internal Transactions By Address And Block#

You can perform a batch query for up to 20 addresses' regular transactions. You need to limit the query to a starting and ending block height, and the difference between the two cannot exceed 10,000 blocks.

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, XLAYER
addressStringYesAddresses, up to 20 can be entered, separated by commas
startBlockHeightStringYesThe start block height for the search
endBlockHeightStringYesThe end block height for the search
pageStringNoPage number
limitStringNoNumber of results per page. The default minimum is 20 and the maximum is 100

Response Parameters#

ParameterTypeDescription
pageStringCurrent page number
limitStringNumber of results per page. The default minimum is 20 and the maximum is 100
totalPageStringTotal number of pages
transactionListArrayList of transactions
> txIdStringTransaction hash
> blockHashStringBlock hash
> heightStringBlock height where the transaction occurred
> operationStringOperation type (e.g., staticcall)
> fromStringTransaction origin addresses, multiple addresses can be separated by commas
> toStringTransaction destination addresses, multiple addresses can be separated by commas
> isFromContractBoolWhether the 'from' address is a contract address
> isToContractBoolWhether the 'to' address is a contract address
> amountStringAmount of tokens involved in the transaction

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/address/internal-transaction-list-multi?chainShortName=xlayer&address=0x1e4a5963abfd975d8c9021ce480b42188849d41d,0x74b7f16337b8972027f6196a17a631ac6de26d22&endBlockHeight=18374470&startBlockHeight=18370000&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": "24",
            "transactionList": [
                {
                    "txId": "0xb3419122edd3f45387d4cf8603b45003d514fd7ba9c1c5218d88f6d284905693",
                    "blockHash": "0x1fa9214b1cfaafa7fcb3fcd9200e5ca2bd59e59e76360a67a4fa797707772079",
                    "height": "18372896",
                    "transactionTime": "1750114210000",
                    "operation": "call",
                    "from": "0xc7545904de04200b3d4676827cdc9977a0d032d5",
                    "to": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
                    "isFromContract": true,
                    "isToContract": true,
                    "amount": "0"
                }
            ]
        }
    ]
}