Wallet API
Transaction List by Address

Transaction List by Address#

Retrieve transaction history for the specified address, sorted in descending order by time.

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique chain identifier
addressStringYesAddress
tokenAddressesArrayNoList of token addresses. If not provided, query all tokens (including mainnet coins)
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
limitStringNoNumber of transactions to retrieve per query, default is 50, maximum is 100
cursorStringNoCursor position, defaults to the first transaction

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 UNIX timestamp in milliseconds
>txStatusStringTransaction status:
1: Pending
2: Successful
3: Failed
>assetSummaryArrayTransaction summary
>>tokenAddressStringToken contract address. Returns empty for mainnet coins.
>>directionStringToken amount change:
1: Decrease
2: Increase
>>tokenAmountStringTransaction token amount
>>tokenAmountNumStringTransaction token integer = transaction token amount * (10 ^ precision)
>>precisionStringPrecision
>>tokenSymbolStringToken symbol
>>tokenNameStringToken name
>>tokenLogoUrlStringToken logo image URL (oss)

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/post-transaction/transactions-by-address?chainIndex=1&address=0x5ffe4eabaf030jg7a1a75d309ead7ad31a0ef980&tokenAddresses=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://",
                "tokenAddress": ""
            }] 
        }
    ],
    "msg": "success"
}