Wallet API
Transaction List by Account

Transaction List by Account#

Retrieve transaction history for all or a specific chain under an account, sorted in descending order by time.

Request Path#

GET https://www.okx.com/api/v5/waas/wallet/post-transaction/transactions

Request Parameters#

ParameterTypeRequiredDescription
accountIdStringYesUnique account identifier
chainIndexStringNoUnique chain identifier (optional, used to filter transactions for a specific chain)
tokenAddressStringNoIf not provided, query all transactions for the specified chain. Use "" for mainnet coin transactions and value for token-related transactions
limitStringNoNumber of transactions to retrieve per query, default is 50, maximum is 100
cursorStringNoCursor position, defaults to the first transaction
beginStringNoStart time, query transactions after this time. Unix timestamp in milliseconds
endStringNoEnd time, query transactions before this time. If neither begin nor end is provided, query transactions before the current time. Unix timestamp in milliseconds

Response Parameters#

ParameterTypeDescription
cursorStringCursor position
transactionsArrayList of transactions
>chainIndexStringUnique chain identifier
>orderIdStringUnique transaction identifier
>txHashStringTransaction hash
>fromAddrStringSource address
>toAddrStringDestination address
txTypeStringTransaction 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
>txTimeStringTransaction time in timestamp
>txStatusStringTransaction status:
1: Pending
2: Successful
3: Failed
>assetSummaryArrayTransaction summary
>>directionStringToken amount change:
1: Decrease
2: Increase
>>tokenAmountStringTransaction currency amount
>>tokenAmountNumStringTransaction token integer = transaction token amount * (10 ^ precision)
>>precisionStringPrecision
>>tokenSymbolStringToken symbol
>>tokenNameStringToken name
>>tokenLogoUrlStringToken logo image URL (oss)
>>tokenAddressStringToken address. Returns empty for mainnet coins.

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/post-transaction/transactions?accountId=44486e05-3235-2f8e-5fe2-a8ab46217863&chains=111,333&chainIndex=1&tokenAddress=xxx&cursor=1&limit=20&begin=168000021888"&end=168000031888 \
--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
{
    "code": "0",
    "data": [
        {
            "chainIndex": "3",  
            "orderId": "string", 
            "txHash": "0xcbf411766d65f3cf92839ababa73c4afec69a83442e8b67a68b5104b50a04ejb",
            "fromAddr": "0x5ffe4eabaf030jg7a1a75d309ead7ad31a0ef980",
            "toAddr": "0x5ffe4eabaf03ff67a1a75d309ead7ad31a0ef817",
            "txType": "2",
            "txTime": "0",
            "txStatus": "1",
            "assetSummary": [{
                "tokenAmount": "5.5",
                "tokenAmountNum": "5",
                "direction":"1",
                "precision": "8",
                "tokenSymbol": "ETH",
                "tokenName": "Ethereum",
                "tokenLogoUrl": "http://example.com/token.png",
                "tokenAddress": ""
            }] 
        }
    ],
    "msg": "success"
}