Retrieve transaction details based on the orderId, requiring the unique wallet account identifier accountId.
GET https://www.okx.com/api/waas/wallet/post-transaction/transaction-detail-by-ordid
Parameter | Type | Required | Description |
---|---|---|---|
chainIndex | String | Yes | Unique chain identifier |
accountId | String | Yes | Unique wallet account identifier |
orderId | String | Yes | Unique transaction identifier |
Parameter | Type | Description |
---|---|---|
chainIndex | String | Unique chain identifier |
orderId | String | Unique transaction identifier |
blockHash | String | Block hash |
blockHeight | String | Block height |
blockTime | String | Block time |
txHash | String | Transaction hash |
feeUsdValue | String | Fee in USD (estimated when pending, actual after confirmation) |
fees | String | Fees (wei for EVM transactions, sats for UTXO transactions) |
gasLimit | String | Gas limit (not applicable for UTXO) |
gasPrice | String | Gas price (wei, not applicable for UTXO) |
gasUsed | String | Gas used (not applicable for UTXO) |
txTime | String | Transaction time in timestamp format |
txType | String | Transaction type (transfer):1 : Receive tokens 2 : Send tokens 3 : Contract interaction 4 : Authorization 50 : BRC20_MINT 51 : BRC20_INSCRIBE 52 : BRC20_TRADE 53 : BRC20_SEND 54 : BRC20_RECEIVE 60 : BRC20_DEPLOY |
txStatus | String | Transaction status:1 : Pending 2 : Successful 3 : Failed |
evmDetails | Array | EVM chain transaction details |
>fromAddr | String | Source address |
>toAddr | String | Destination address |
>txAmount | String | Transfer amount (integer, amount = txAmount / 10^precision) |
>iType | String | Sub-transaction type:0 : Outer chain coin transfer 1 : Inner chain coin transfer 2 : Token transfer |
>tokenAddress | String | Contract address |
>contractCall | Boolean | Contract call indicator |
>logIndex | String | Log index |
>nonce | String | Nonce |
>status | String | Sub-transaction status:1 : Pending 2 : Successful 3 : Failed |
utxoDetail | Object | UTXO sub-transaction details |
>vin | Array | Inputs |
>>addr | String | Address |
>>number | String | Number |
>>txHash | String | Transaction hash |
>>amount | String | Amount |
>>voutIndex | String | Output |
>voutIndex | Array | Output |
>>addr | String | Address |
>>addrInVin | Boolean | Whether this output address is also in vin |
>>number | String | Number |
>>amount | String | Amount |
curl --location --request GET 'https://www.okx.com/api/api/v5/waas/wallet/post-transaction/transaction-detail-by-ordid?orderId=tx-001&chainIndex=111' \
--header 'Content-Type: application/json' \
--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'
For ETH
{
"code": "0",
"data":[
{
"chainIndex": "0",
"orderId": "String",
"txHash": "String",
"blockHash" : "0x3ee63382b883fc40e35da6023fb341dd01cd2ec011f992bb54cf312f517740c9",
"blockHeight" : "19235519",
"blockTime" : "1708026551000",
"feeUsdValue" : "138.846919",
"fees" : "49102595635945621",
"gasLimit" : "2000000",
"gasPrice" : "87504603347",
"gasUsed" : "561143",
"txType": "0",
"txTime": "0",
"txStatus": "0",
"evmDetails": [
{
"iType" : "0",
"txAmount": "0",
"tokenAddress":"",
"contractCall" : true,
"fromAddr" : "0x3ee63382b883fc40e35da6023fb341dd01cd2ec011f992bb54cf312f517740c9",
"toAddr" : "0x3ee63382b883fc40e35da6023fb341dd01cd2ec011f992bb54cf312f517740c9",
"logIndex" : "-1",
"status" : "SUCCESS"
}
]
}
],
"msg": "success"
}
For BTC
{
"code": "0",
"data":[
{
"chainIndex": "0",
"orderId": "String",
"txHash": "String",
"blockHash" : "0x3ee63382b883fc40e35da6023fb341dd01cd2ec011f992bb54cf312f517740c9",
"blockHeight" : "19235519",
"blockTime" : "1708026551000",
"feeUsdValue" : "138.846919",
"fees" : "49102595635945621",
"gasLimit" : "2000000",
"gasPrice" : "87504603347",
"gasUsed" : "561143",
"txType": "0",
"txTime": "0",
"txStatus": "0",
"utxoDetail":{
"vin" : [
{
"addr" : "bc1p077evnzjv9w697a523jxvhyyt0aptmgunkk2a8wsppy3mty7gj7q9j6azc",
"number" : "0",
"txHash" : "3aead5cb471bf2d30b6c2bc9961a579a91ad0a7562800356e6c29f9c5b05a964",
"amount" : "2990241",
"voutIndex" : "1"
}
],
"voutIndex" : [
{
"addr":"",
"addrInVin" : false,
"number" : "0",
"amount" : "0"
},
{
"addr" : "bc1p6eu0hkl3jy449wrm52exssure7a8083dcsfkydh02c4vyrs2y83shdcmsy",
"addrInVin" : false,
"number" : "1",
"amount" : "330"
}
]
}
}
],
"msg": "success"
}