钱包 API(建设中)
查询某个交易的详情

查询某个交易的详情#

查询某个交易的详情。

请求地址#

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

请求参数#

ParameterTypeRequiredDescription
walletIdStringYes钱包唯一标识
orderIdStringNo交易唯一标识
txHashStringNo交易哈希,不能和orderId同时为空
chainIdStringYes链唯一标识

响应参数#

ParameterTypeDescription
chainIdstring链唯一标识
orderIdstring交易唯一标识
txhashstring交易 hash
addressstring钱包地址
fromAddrstring来源地址
toAddrstring目的地址
inAddrListArray输入地址列表
>addressString地址
>coinAmountString代币数量
outAddrListArray输出地址列表
>addressString地址
>coinAmountString代币数量
txTypestring交易类型
1:接收代币
2:发送代币
3:合约交互
50:BRC20_MINT
51:BRC20_INSCRIBE
52:BRC20_TRADE
53:BRC20_SEND
54:BRC20_RECEIVE
60:BRC20_DEPLOY
txTimestring交易时间,时间戳
txStatusstring交易状态
1、2 排队中
3 失败
4 成功
exploreUrlstringurl
gasPricestringgas price
priorityFeestringpriority fee
gasLimitstringgas limit
noncestringnonce
assetChangeArray资产变动
>coinIdstring币种唯一标识
>brc20Coinboolean是否 BRC20 代币
>directionstring交易方向
>coinAmountstring交易货币数
>coinAmountNumstring交易货币整数
>precisionstring精度
>coinSymbolstring货币 symbol
>coinNamestring货币名称
>currencyAmountstring法币金额(美元)
>coinLogoUrlstring币种 logo 图片 URL

请求示例#

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'

响应示例#

200
{
    "code": 0,
    "msg": "success",
    "data": [
        {
            "chainId": "1",
            "orderId": "469356614923743232",
            "txhash": "79c06b829866217e7a5843def7c5ceaa8451971044e35616330ac3b37c3c7854",
            "address": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2",
            "fromAddr": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2",
            "toAddr": "0x1e80c39051f078ee34763282cbb36ffd88b40c65",
            "inAddrList" : [ {
              "address" : "bc1p8d6xdugtmec54usetwyaqjsddlduxe28ee58hhv34um4usq5u8xqmmhvgr",
              "coinAmount":"123000000000000"
              ""
            } ],
            "outAddrList" : [ {
              "address" : "bc1p8d6xdugtmec54usetwyaqjsddlduxe28ee58hhv34um4usq5u8xqmmhvgr"
            } ],
            "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"
                }
            ]
        }
    ]
}