Get History by Address#
Query the transaction history under the address dimension for 6 months, sorted in descending chronological order.
Request URL#
GET https://web3.okx.com/api/v6/dex/post-transaction/transactions-by-address
Request Parameters#
| Parameter | Type | Required | Description | 
|---|---|---|---|
| address | String | Yes | Address to query the transaction history for | 
| chains | String | No | Filter the chains whose transaction history needs to be queried. Multiple chains are separated by ",". A maximum of 50 chains are supported. | 
| tokenContractAddress | String | No | Token contract address; if empty, query addresses with main chain currency balance;if not pass, query all | 
| begin | String | No | Start time, queries transactions after this time. Unix timestamp, in milliseconds | 
| end | String | No | End time, queries transactions before this time. If both begin and end are not provided, queries transactions before the current time. Unix timestamp, in milliseconds | 
| cursor | String | No | Cursor | 
| limit | String | No | Number of records to return, defaults to the most recent 20 records. Up to a maximum of 20 records for query on single chain. Up to a maximum of 100 records for query on multiple chain. | 
Response Parameters#
| Parameter | Type | Description | 
|---|---|---|
| transactions | Array | List of transactions | 
| >chainIndex | String | Chain ID | 
| >txHash | String | Transaction hash | 
| >itype | String | Transaction tier type 0: Outer main chain coin transfer1: Contract inner main chain coin transfer2: Token transfer | 
| >methodId | String | Contract Function Call | 
| >nonce | String | The nth transaction initiated by the sender address | 
| >txTime | String | Transaction time in Unix timestamp format, in milliseconds, e.g., 1597026383085 | 
| >from | Array | Transaction input | 
| >>address | String | Sending/input address, comma-separated for multi-signature transactions | 
| >>amount | String | Input amount | 
| >to | Array | Transaction output | 
| >>address | String | Receiving/output address, comma-separated for multiple addresses | 
| >>amount | String | Output amount | 
| >tokenContractAddress | String | Token contract address | 
| >amount | String | Transaction amount | 
| >symbol | String | Currency symbol corresponding to the transaction amount | 
| >txFee | String | Transaction fee | 
| >txStatus | String | Transaction status: successfor successful transactions,failfor failed transactions,pendingfor pending transactions | 
| >hitBlacklist | Boolean | false: Not in blacklist,true: In blacklist | 
| cursor | String | Cursor | 
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/post-transaction/transactions-by-address?addresses=0x50c476a139aab23fdaf9bca12614cdd54a4244e4&chains=1' \
--header 'Content-Type: application/json' \
--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": ""
                        }
                    ],
                    "tokenContractAddress": "0xe13c851c331874028cd8f681052ad3367000fb13",
                    "amount": "1",
                    "symbol": "claim rewards on stethdao.net",
                    "txFee": "",
                    "txStatus": "success",
                    "hitBlacklist": true,
                    "itype": "2"
                }
            ]
        }
    ]
}
