More resources
Query transaction history

Query transaction history#

Query the transaction history of all or a specific chain under the current wallet.

Request URL#

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

Request parameters#

ParameterTypeRequiredDescription
walletIdStringYesUnique identifier of the wallet
chainIdsArray<String>NoList of unique identifiers of the chain
lastRowIdStringNoDefault is empty, representing the first page
limitStringNoHow many items to query per page. Default is 20
startDateStringNoStart time (YYYY-MM-DD HH:MM:SS)
endDateStringNoEnd time (YYYY-MM-DD HH:MM:SS)

Response parameters#

ParameterTypeDescription
chainIdStringUnique identifier of the chain
orderIdStringUnique identifier of the transaction
txHashStringTransaction hash
fromAddrStringSource address
toAddrStringDestination address
txTypeStringTransaction type
txTimeStringTransaction time (timestamp)
txStatusStringTransaction status: 1, 2 in queue; 3 failed, 4 successful
rowIdStringRowId (offset function)
assetSummaryArray<Object>Transaction summary
>coinIdStringUnique identifier of the coin
>brc20CoinBooleanIs it BRC-20 token
>directionStringTransaction direction
>coinAmountStringTransaction coin amount
>coinAmountNumStringTransaction coin integer
>precisionStringPrecision
>coinSymbolStringCoin symbol
>coinNameStringCoin name
>coinLogoUrlStringCoin logo image URL (oss)

Request example#

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"
}'

Response example#

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
                }
            ]
        }
    ]
}