Wallet API
Query transaction details

Query transaction details#

Query the details of a transaction.

Request URL#

GET https://www.okx.com/api/v5/waas/transaction/get-transaction-detail

Request parameters#

ParameterTypeRequiredDescription
walletIdStringYesUnique identifier of the wallet
orderIdStringNoUnique identifier of the transaction
txHashStringNoTransaction hash,cannot be empty at the same time as orderId
chainIdStringYesUnique identifier of the chain

Response parameters#

ParameterTypeDescription
chainIdStringUnique identifier of the chain
orderIdStringUnique identifier of the transaction
txhashStringTransaction hash
addressStringWallet address
fromAddrStringSend address, both EVM and UTXO network transactions return
toAddrStringReceive address,both EVM and UTXO network transactions return
inAddrListArray<String>In address list,only UTXO network transactions return
>addressStringAddress
>coinAmountStringCoin amount
outAddrListArray<String>Out Address List,only UTXO network transactions return
>addressStringAddress
>coinAmountStringCoin amount
txTypeStringTransaction type,
1:receive
2:send
3:contract call
50:BRC20_MINT
51:BRC20_INSCRIBE
52:BRC20_TRADE
53:BRC20_SEND
54:BRC20_RECEIVE
60:BRC20_DEPLOY
txTimeStringTransaction time (timestamp)
txStatusStringTransaction status: 1, 2 in queue; 3 failed, 4 successful
exploreUrlStringURL
gasPriceStringGasPrice
priorityFeeStringPriorityFee
gasLimitStringGasLimit
nonceStringNonce
assetChangeArray<Object>Asset change
>coinIdStringUnique identifier of the coin
>brc20CoinBooleanIs it BRC-20 token
>directionStringTransaction direction
>coinAmountStringTransaction coin amount
>coinAmountNumStringTransaction coin integer
>precisionStringPrecision
>coinSymbolStringCoin symbol
>coinNameStringCoin name
>currencyAmountStringFiat coin amount (USD)
>coinLogoUrlStringCoin logo image URL (oss)

Request example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/transaction/get-transaction-detail?walletId=13886e05-1265-4b79-8ac3-b7ab46211001&orderId=469356614923743232&txHash=79c06b829866217e7a5843def7c5ceaa8451971044e35616330ac3b37c3c7854&chainId=1' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--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#

200
{
  "code": "0",
  "msg": "success",
  "data": [{
    "chainId": "1",
    "orderId": "469356614923743232",
    "txhash": "79c06b829866217e7a5843def7c5ceaa8451971044e35616330ac3b37c3c7854",
    "address": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2",
    "fromAddr": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2",
    "toAddr": "0x1e80c39051f078ee34763282cbb36ffd88b40c65",
    }],
    "txType": "2",
    "txTime": "1697547606177",
    "txStatus": "3",
    "exploreUrl": "",
    "gasPrice": "null",
    "priorityFee": "null",
    "gasLimit": "null",
    "nonce": "null",
    "assetChange": [{
      "coinId": "3",
      "brc20Coin":true;
      "direction": "2",
      "coinAmount": "0.00012300000000000",
      "coinAmountNum": "123000000000000",
      "precision": "18",
      "coinSymbol": "ETH",
      "coinName": "ETH",
      "currencyAmount": null,
      "coinLogoUrl": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png"
    }]
  }]
}