Utvecklingsportal
Tema

Batch Get Internal Transaction Details#

Retrieve details of internal transactions triggered by contract calls for multiple transaction hashes at once, with up to 20 hashes per request (comma-separated; duplicate hashes are deduplicated automatically). Results are paginated with cursor and limit. This endpoint supports EVM chains only.

Supported chains: see Get Transaction API Supported Chains (apiName: internal-transaction-multi).

Request URL#

GET
https://web3.okx.com/api/v6/explorer/transaction/internal-transaction-multi

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique identifier of the chain, e.g., 1 for ETH, 0 for BTC. See Get Transaction API Supported Chains for supported values.
txIdStringYesTransaction hash. Separate multiple transactions with commas, up to 20; duplicate hashes are deduplicated automatically.
limitStringNoNumber of results per page, defaults to 20, up to a maximum of 100.
cursorStringNoCursor returned by the previous response; omit it on the first page.

Response Parameters#

ParameterTypeDescription
limitStringMaximum number of results per page.
cursorStringCursor for the next page; an empty string means no more pages. Pass it back as-is; clients should not parse or construct it.
transactionListArrayInternal transaction list.
> txIdStringTransaction hash.
> blockHashStringBlock hash.
> heightStringBlock height.
> transactionTimeStringTransaction time, as a Unix timestamp in milliseconds.
> operationStringOperation type, e.g., call, delegatecall, create.
> fromStringSender address.
> toStringRecipient address.
> isFromContractBooleanWhether the from address is a contract address.
> isToContractBooleanWhether the to address is a contract address.
> amountStringTransaction amount.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/transaction/internal-transaction-multi?chainIndex=1&txId=0x1e4996d90e77ee87f6a1a2a071603ee5d55d6dd7b272209b741ff276f4a1c34c&limit=20' \
--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": "20",
      "cursor": "",
      "transactionList": [
        {
          "txId": "0x1e4996d90e77ee87f6a1a2a071603ee5d55d6dd7b272209b741ff276f4a1c34c",
          "blockHash": "0x7c1f0d95cbc7c4c018daae6cf3cf4ffef4dee62dfc9444838f4c5122a4899c9f",
          "height": "18126486",
          "transactionTime": "1694991899000",
          "operation": "call",
          "from": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
          "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "isFromContract": true,
          "isToContract": true,
          "amount": "0.25"
        }
      ]
    }
  ]
}