Entwicklerportal
Anzeigemodus

Batch Get Transaction Details#

Retrieve basic transaction details for multiple transaction hashes at once, with up to 20 hashes per request (comma-separated; duplicate hashes are deduplicated automatically). Results are returned as a flat array without pagination. This endpoint supports EVM chains only.

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

Request URL#

GET
https://web3.okx.com/api/v6/explorer/transaction/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.

Response Parameters#

ParameterTypeDescription
txIdStringTransaction hash.
methodIdStringMethod ID; an empty string for non-contract calls.
blockHashStringBlock hash.
heightStringHeight of the block containing the transaction.
transactionTimeStringTransaction time, as a Unix timestamp in milliseconds.
fromStringSender address.
toStringRecipient address.
isFromContractBooleanWhether the from address is a contract address.
isToContractBooleanWhether the to address is a contract address.
amountStringTransaction amount.
symbolStringCurrency corresponding to the transaction amount.
nonceStringSequence number of this transaction from the sender address.
txFeeStringTransaction fee.
gasPriceStringGas price.
gasLimitStringGas limit.
gasUsedStringGas used.
stateStringTransaction state: success for succeeded, fail for failed, pending for awaiting confirmation.
transactionTypeStringTransaction type.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/transaction/transaction-multi?chainIndex=1&txId=0x1e4996d90e77ee87f6a1a2a071603ee5d55d6dd7b272209b741ff276f4a1c34c,0x8e2fbf59e7ffbc0d5cbb2a6e903824adecc9d2a5b78539e0bce9db32adfd85c9' \
--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": [
    {
      "txId": "0x1e4996d90e77ee87f6a1a2a071603ee5d55d6dd7b272209b741ff276f4a1c34c",
      "methodId": "0xa9059cbb",
      "blockHash": "0x7c1f0d95cbc7c4c018daae6cf3cf4ffef4dee62dfc9444838f4c5122a4899c9f",
      "height": "18126486",
      "transactionTime": "1694991899000",
      "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "isFromContract": false,
      "isToContract": true,
      "amount": "0",
      "symbol": "ETH",
      "nonce": "1057",
      "txFee": "0.001222264816491852",
      "gasPrice": "26510970622",
      "gasLimit": "63209",
      "gasUsed": "46106",
      "state": "success",
      "transactionType": "2"
    },
    {
      "txId": "0x8e2fbf59e7ffbc0d5cbb2a6e903824adecc9d2a5b78539e0bce9db32adfd85c9",
      "methodId": "",
      "blockHash": "0x2b6cbc4bb2b6f52e7a2c11d4a9762dcefb985dbd6448bd41ce00cf50c02fca92",
      "height": "18126501",
      "transactionTime": "1694992079000",
      "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "to": "0x282edab8a933bc1c02649fe3ea2842ecb8e26183",
      "isFromContract": false,
      "isToContract": false,
      "amount": "0.5",
      "symbol": "ETH",
      "nonce": "1058",
      "txFee": "0.000549084273462",
      "gasPrice": "26147822546",
      "gasLimit": "21000",
      "gasUsed": "21000",
      "state": "success",
      "transactionType": "2"
    }
  ]
}