Wallet API
Query Address Transaction List

Query Address Transaction List#

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

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
addressStringYesAccount Address of a chain
chainsArrayYesAn array of EVM chainIndex numbers, allowing batch retrieval of transaction lists from different EVM chains
beginStringNoStart time, queries transaction history later than this time. Unix timestamp in milliseconds
endStringNoEnd time, queries transaction history earlier than this time. If neither begin nor end are provided, the query returns transaction history up to the current time. Unix timestamp in milliseconds
cursorStringNoCursor
limitStringNoNumber of results returned, defaults to the latest 20, maximum of 100

Response Parameters#

ParameterTypeDescription
transactionListArrayList of transactions
>chainIndexStringChain ID
>txHashStringTransaction hash
>iTypeStringEVM Transaction tier type
0: Outer main chain coin transfer
1: Contract inner main chain coin transfer
2: Token transfer
>methodIdStringContract Function Call
>nonceStringThe nth transaction initiated by the sender address
>txTimeStringTransaction time in Unix timestamp format, in milliseconds, e.g., 1597026383085
>fromArrayTransaction input
>>addressStringSending/input address, comma-separated for multi-signature transactions
>>amountStringInput amount
>toArrayTransaction output
>>addressStringReceiving/output address, comma-separated for multiple addresses
>>amountStringOutput amount
>tokenAddressStringToken contract address
>amountStringTransaction amount
>symbolStringCurrency symbol corresponding to the transaction amount
>txFeeStringTransaction fee
>txStatusStringTransaction status: success for successful transactions, fail for failed transactions, pending for pending transactions
>hitBlacklistBooleanfalse: Not in blacklist, true: In blacklist
>tagStringTag type for blacklisted addresses, including phishing, contract vulnerabilities, etc.
cursorStringCursor

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/wallet/post-transaction/transactions-by-address?addresses=0x50c476a139aab23fdaf9bca12614cdd54a4244e4&chains=1' \
--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",
    "msg": "success",
    "data": [
        {
            "cursor": "1706197403",
            "transactionList": [
                {
                    "chainIndex": "1",
                    "txHash": "0x963767695543cfb7804039c470b110b87adf9ab69ebc002b571523b714b828ca",
                    "methodId": "",
                    "nonce": "",
                    "txTime": "1724213411000",
                    "from": [
                        {
                            "address": 
                                "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
                                "amount": ""
                        }
                    ],
                    "to": [
                        {
                            "address": 
                                "0x50c476a139aab23fdaf9bca12614cdd54a4244e4"
                                "amount": ""
                        }
                    ],
                    "tokenAddress": "0xe13c851c331874028cd8f681052ad3367000fb13",
                    "amount": "1",
                    "symbol": "claim rewards on stethdao.net",
                    "txFee": "",
                    "txStatus": "success",
                    "hitBlacklist": true,
                    "tag": "Risk Airdrop",
                    "iType": "2"
                }
            ]
        }
    ]
}