> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dexutils.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Token DEX Trades

> Retrieve recent or historical DEX trades for a specific token.

```http theme={null}
GET /tokens/{address}/dex_trades
```

### Path Parameters

<ParamField path="address" type="string" required>
  Token contract address.
</ParamField>

### **Query Parameters**

<ParamField query="chain" type="string" required>
  Blockchain network where the token is deployed.
</ParamField>

<ParamField query="side" type="string">
  Trade side to retrieve.

  Available values: `all` ,`buy` `sell`

  Default: `all`
</ParamField>

<ParamField query="from_ts" type="integer">
  Start of the time range as a Unix timestamp. If `null`, results start from the latest available trades or are bounded by `to_ts`.
</ParamField>

<ParamField query="to_ts" type="integer">
  End of the time range as a Unix timestamp. If `null`, results continue from `from_ts` to the latest available trades.
</ParamField>

<Info>
  `from_ts` and `to_ts` Behavior

  Both values are `null` - Returns the latest 100 DEX trades in descending order (newest first).

  Only `from_ts` is `null` - Returns up to 100 DEX trades before `to_ts` in descending order.

  Only `to_ts` is `null` - Returns up to 100 DEX trades since `from_ts` in ascending order.

  Both values are not `null` - Returns DEX trades within the specified time range in descending order. The difference between `from_ts` and `to_ts` must not exceed **300 seconds (5 minutes)**.
</Info>

### Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  # Replace with your actual API key from the DEXUtils platform
  curl "https://api.dexutils.io/tokens/0x6982508145454ce325ddbe47a25d4ec3d2311933/dex_trades?chain=ethereum&side=sell" \
    -H "API-KEY: apikey"
  ```

  ```python Python theme={null}
  import requests

  # Replace with your actual API key from the DEXUtils platform
  address = "0x6982508145454ce325ddbe47a25d4ec3d2311933"
  url = f"https://api.dexutils.io/v1/tokens/{address}/dex_trades"
  headers = {"API-KEY": "apikey"}
  params = {
  	"chain": "ethereum",
  	"side": "sell",
  }

  response = requests.get(url, headers=headers, params=params)
  res = response.json()
  ```
</CodeGroup>

***

### **Response Fields**

<ResponseField name="trader_address" type="string">
  Wallet address that executed the trade.
</ResponseField>

<ResponseField name="tx_hash" type="string">
  Transaction hash of the trade.
</ResponseField>

<ResponseField name="tx_timestamp" type="integer">
  Unix timestamp when the transaction occurred.
</ResponseField>

<ResponseField name="block_number" type="integer">
  Blockchain block containing the transaction.
</ResponseField>

<ResponseField name="bought_token_address" type="string">
  Contract address of the token received.
</ResponseField>

<ResponseField name="bought_token_symbol" type="string">
  Symbol of the token received.
</ResponseField>

<ResponseField name="bought_token_amount" type="float">
  Amount of the token received.
</ResponseField>

<ResponseField name="sold_token_address" type="string">
  Contract address of the token sold.
</ResponseField>

<ResponseField name="sold_token_symbol" type="string">
  Symbol of the token sold.
</ResponseField>

<ResponseField name="sold_token_amount" type="float">
  Amount of the token sold.
</ResponseField>

<ResponseField name="amount_usd" type="float">
  Estimated USD value of the trade, if available.
</ResponseField>

### Example Response

```json Example Response theme={null}
[
    {
        "trader_address": "0xd128eb70bf506530f99c6e0e9e9ff91332402652",
        "tx_hash": "0x8b4d327b98bca73c69d4b306541a5729d9abaa563e8f60ac4b8b5653095f39b8",
        "tx_timestamp": 1785742175,
        "block_number": 25672879,
        "bought_token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "bought_token_symbol": "WETH",
        "bought_token_amount": 0.006505012580911696,
        "sold_token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "sold_token_symbol": "PEPE",
        "sold_token_amount": 4256420.133880892,
        "amount_usd": 11.9847701289459
    },
    {
        "trader_address": "0xd128eb70bf506530f99c6e0e9e9ff91332402652",
        "tx_hash": "0x8b4d327b98bca73c69d4b306541a5729d9abaa563e8f60ac4b8b5653095f39b8",
        "tx_timestamp": 1785742175,
        "block_number": 25672879,
        "bought_token_address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
        "bought_token_symbol": "WBTC",
        "bought_token_amount": 0.00025033,
        "sold_token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "sold_token_symbol": "PEPE",
        "sold_token_amount": 5544748.689921352,
        "amount_usd": null
    },
    {
        "trader_address": "0xd128eb70bf506530f99c6e0e9e9ff91332402652",
        "tx_hash": "0x8b4d327b98bca73c69d4b306541a5729d9abaa563e8f60ac4b8b5653095f39b8",
        "tx_timestamp": 1785742175,
        "block_number": 25672879,
        "bought_token_address": "0xbe1936a67f503e0eaf2434b0cf9f4e3d7100008a",
        "bought_token_symbol": "PROS",
        "bought_token_amount": 1117.3958609253702,
        "sold_token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "sold_token_symbol": "PEPE",
        "sold_token_amount": 8533555.343010182,
        "amount_usd": null
    },
    {
        "trader_address": "0x433702873e33d4846d399a75aaf96eacf181d0b2",
        "tx_hash": "0x2f88924136d53d834b5bb30a96a41218aab3741c57f1b5ec17bea8f6e6092994",
        "tx_timestamp": 1785740819,
        "block_number": 25672766,
        "bought_token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "bought_token_symbol": "WETH",
        "bought_token_amount": 0.12621275901409332,
        "sold_token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "sold_token_symbol": "PEPE",
        "sold_token_amount": 82585354.18271452,
        "amount_usd": 232.86506463618244
    },
    {
        "trader_address": "0xa5c86c77316abf49cc8f1ea3ec2cfa1e56dc225a",
        "tx_hash": "0x9950075932cb6090abefd39b3a82ea120bc9ec2589257ea2d236262d63b0b2f3",
        "tx_timestamp": 1785740735,
        "block_number": 25672759,
        "bought_token_address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "bought_token_symbol": "WETH",
        "bought_token_amount": 0.02166139184690062,
        "sold_token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
        "sold_token_symbol": "PEPE",
        "sold_token_amount": 14184151.64258595,
        "amount_usd": 39.952054508505036
    }
]
```
