# By DEX

**Tier:** Dev

`GET /hip3-analytics/by-dex`

Granular HIP-3 stats broken down by builder DEX — volume, trade count, builder fees, liquidation count/value, and unique traders per venue. This data is also bundled in the `/dashboard` endpoint; use this endpoint when you need just the per-DEX breakdown without the rest of the dashboard payload.

---

## Metric notes

- `liquidation_count` and `liquidation_value_usd` count only the liquidated user's fill (`liq_user IS NOT NULL` and `trader = liq_user`). Counterparty fills are excluded to avoid double-counting.

## Authentication

Requires Dev tier or higher. Free tier does not have access (returns 403).

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `range` | string | No | `4h`, `1d`, `7d`, `30d`, or `all`. Defaults to `1d`. Legacy `period` is accepted until July 21, 2026. |

## Example request

```bash
curl -H "X-Api-Key: lk_live_your_key_here" \
  "https://api.loris.tools/hip3-analytics/by-dex?range=1d"
```

## Example response

```json
{
  "success": true,
  "range": "1d",
  "period": "1d",
  "data": [
    {
      "dex_name": "hyperliquid_dex",
      "volume": 210000000,
      "total_fees": 105000,
      "trade_count": 54200,
      "unique_users": 3820,
      "liquidation_count": 210,
      "liquidation_value_usd": 98000000,
      "total_deployer_fees": 52000,
      "builder_revenue": 58000
    },
    {
      "dex_name": "another_dex",
      "volume": 84000000,
      "total_fees": 42000,
      "trade_count": 21400,
      "unique_users": 1240,
      "liquidation_count": 85,
      "liquidation_value_usd": 41000000,
      "total_deployer_fees": 21000,
      "builder_revenue": 24000
    }
  ]
}
```

## Related

- [Dashboard](/docs/api/hip3-analytics/dashboard)
- [By Symbol](/docs/api/hip3-analytics/by-symbol)
- [DEX Detail](/docs/api/hip3-analytics/dex-detail)
