Get Address DEX Transaction List#
Get the historical DEX transaction list of the address in reverse chronological order
Limit: 1000 records, up to 100 per request
Request Path#
GET https://web3.okx.com/api/v6/dex/market/portfolio/dex-history
Request Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique identifier of the chain, pass the chain ID (e.g., 501 for Solana) |
| walletAddress | String | Yes | Wallet address to query |
| begin | String | Yes | Start timestamp (milliseconds) |
| end | String | Yes | End timestamp (milliseconds) |
| tokenContractAddress | String | No | Token contract address; if not provided, returns transactions for all tokens |
| type | String | No | Transaction type: 1=BUY, 2=SELL, 3=Transfer In, 4=Transfer Out, supports comma-separated multiple types |
| cursor | String | No | Pagination cursor, pass the cursor value returned from the previous request |
| limit | String | No | Number of records per page, max 100 |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| transactionList | Array | Transaction list |
| >type | String | Transaction type (1=BUY, 2=SELL, 3=Transfer In, 4=Transfer Out) |
| >chainIndex | String | Unique identifier of the chain |
| >tokenContractAddress | String | Token contract address |
| >tokenSymbol | String | Token symbol |
| >valueUsd | String | Transaction value (USD) |
| >amount | String | Token amount |
| >price | String | Transaction price |
| >marketCap | String | Market cap |
| >pnlUsd | String | PnL (USD) |
| >time | String | Transaction timestamp (milliseconds) |
| cursor | String | Pagination cursor for retrieving the next page of data |
Request Example#
Shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/market/portfolio/dex-history?chainIndex=1&walletAddress=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&begin=1700000000000&end=1710000000000&limit=10' \
--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#
Json
{
"code": "0",
"data": {
"transactionList": [
{
"type": "1",
"chainIndex": "1",
"tokenContractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenSymbol": "USDT",
"valueUsd": "1000.00",
"amount": "1000",
"price": "1.00",
"marketCap": "100000000000",
"pnlUsd": "50.00",
"time": "1709900000000"
}
],
"cursor": "0"
},
"msg": ""
}