Wallet API
Get Transaction Details by Order ID

Get Transaction Details by Order ID#

Retrieve detailed information for a specific transaction using its orderId. This supports transactions on both EVM and UTXO model networks and requires specifying the unique accountId for the wallet.

Request Path#

GET https://www.okx.com/api/v5/wallet/post-transaction/transaction-detail-by-ordid

Request Parameters#

ParameterTypeRequiredDescription
orderIdStringYesUnique identifier for the transaction

Response Parameters#

ParameterTypeDescription
chainIndexStringUnique identifier for the chain
accountIdStringUnique identifier for the account
fromAddrStringFrom address, supports multiple addresses, separated by commas
toAddrStringTo address, supports multiple addresses, separated by commas
txHashStringTransaction hash
txAmountStringAmount transferred in main chain currency, specified in the smallest unit of the chain native token, e.g., wei for EVM chains
txStatusStringTransaction status:
1: Pending
2: Success
3: Fail
tokenAddressStringToken address
extJsonObjectExtended parameters
>gasLimitStringGas limit
>nonceStringNonce
>gasPriceStringGas price

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/wallet/post-transaction/transaction-detail-by-ordid?orderId=592051a92a744627022955be929ecb5c9e777705&chainIndex=1' \
--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'

Response Example#

200
Example in ETH:

{
    "code": "0",
    "msg": "success",
    "data": [
        {
            "chainIndex": "1",
            "accountId": "c79e7775-9e78-4a2d-b27f-9021f3bf5fca",
            "fromAddr": "0x238193be9e80e68eace3588b45d8cf4a7eae0fa3",
            "toAddr": "0x238193be9e80e68eace3588b45d8cf4a7eae0fa3",
            "txHash": "0xc401ffcd2a2b4b1db42ce68dfde8e63c0a1e9653484efb2873dbf5d0cbeb227a",
            "txAmount": "10000000000000",
            "tokenAddress": "",
            "txStatus": "1",
            "extJson": {
                "gasLimit": "21040",
                "feeRate": "1997620912"
            }
        }
    ]
}