更多资源
查询全量交易历史

查询全量交易历史#

查询钱包下所有链或某条链的历史交易记录。

请求地址#

POST https://www.okx.com/api/v5/waas/transaction/get-transactions

请求参数#

ParameterTypeRequiredDescription
walletIdStringYes钱包唯一标识
chainIdsArray<String>No链唯一标识列表
lastRowIdStringNo默认空,表示第一页
limitStringNo每页查询多少条数据,默认值为 20
startDateStringNo开始时间 (YYYY-MM-DD HH:MM:SS)
endDateStringNo结束时间 (YYYY-MM-DD HH:MM:SS)

响应参数#

ParameterTypeDescription
chainIdString链唯一标识
orderIdString交易唯一标识
txHashString交易哈希
fromAddrString发送地址
toAddrString接收地址
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:成功
rowIdStringrowId (offset 作用)
assetSummaryArray<Object>交易概要
>coinIdString币种唯一标识
>brc20CoinBooleanolean是否 BRC-20代币
>directionString交易方向
>coinAmountString交易货币数
>coinAmountNumString交易货币整数
>precisionString精度
>coinSymbolString货币 symbol
>coinNameString货币名称
>coinLogoUrlString币种 logo 图片 URL

请求示例#

shell
curl --location --request POST 'https://www.okx.com/api/v5/waas/transaction/get-transactions' \
--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' \
--data-raw '{
    "walletId": "13886e05-1265-4b79-8ac3-b7ab46211001",
    "chainIds": ["1"],
    "lastRowId": "1",
    "limit": "20",
    "startDate": "2023-07-11 00:00:00",
    "endDate" : "2023-07-23 00:00:00"
}'

响应示例#

200
{
    "code": "0",
    "msg": "success",
    "data": [
        {
            "chainId": "56",
            "orderId": "489315326522433536",
            "txHash": "0x8b6a3fa8f6dfe532f3d3473d6af9f61e3dbae2c4286d64dffe25b3278bc8750d",
            "fromAddr": "0x40b9c3c3870783d79d103281e0e68510f75cea82",
            "toAddr": "0x238193be9e80e68eace3588b45d8cf4a7eae0fa3",
            "txType": "1",
            "txTime": "1702306137000",
            "txStatus": "4",
            "rowId": "1702306136079529866",
            "assetSummary": [
                {
                    "coinId": "5000",
                    "brc20Coin": false,
                    "coinAmount": "0.00992357105962900",
                    "coinAmountNum": "9923571059629000",
                    "precision": "18",
                    "coinSymbol": "BNB",
                    "coinName": "Binance Coin",
                    "coinLogoUrl": "https://static.coinall.ltd/cdn/wallet/logo/BNB-20220308.png",
                    "direction": 1
                }
            ]
        },
        {
            "chainId": "1",
            "orderId": "489312340328722453",
            "txHash": "0xa084dc6d7d840f063854d2c484f6caa55f99f3052811611f9b9344888b865159",
            "fromAddr": "0xf977814e90da44bfa03b6295a0616a897441acec",
            "toAddr": "0x28c6c06298d514db089934071355e5743bf21d60",
            "txType": "2",
            "txTime": "1702305419000",
            "txStatus": "4",
            "rowId": "1702305417348249046",
            "assetSummary": [
                {
                    "coinId": "25",
                    "brc20Coin": false,
                    "coinAmount": "10412.29700000000000000",
                    "coinAmountNum": "10412297000000000000000",
                    "precision": "18",
                    "coinSymbol": "MKR",
                    "coinName": "Maker",
                    "coinLogoUrl": "https://static.coinall.ltd/cdn/wallet/logo/MKR-20220328.png",
                    "direction": 2
                }
            ]
        }
    ]
}