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

# Condition Metrics

> Get notified when a market's volume or transaction metrics cross a threshold.

<Note>
  **Event:** `condition_metrics` \
  **Endpoint:** `wss://api.struct.to/ws/alerts` \
  **Cost:** 0.1 credits per event
</Note>

Get notified when a market's volume or transaction metrics cross a threshold. Use filters to narrow alerts to specific conditions, volume ranges, or timeframes.

## Filters

| Filter               | Type      | Required | Description                                                                    |
| -------------------- | --------- | -------- | ------------------------------------------------------------------------------ |
| `condition_ids`      | string\[] | No       | Restrict to specific conditions (max 500)                                      |
| `min_volume_usd`     | number    | No       | Minimum volume in USD                                                          |
| `max_volume_usd`     | number    | No       | Maximum volume in USD                                                          |
| `min_fees`           | number    | No       | Minimum fees in USD                                                            |
| `min_txns`           | number    | No       | Minimum transaction count                                                      |
| `min_unique_traders` | number    | No       | Minimum unique trader count                                                    |
| `timeframes`         | string\[] | No       | Timeframe windows: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d` (max 500) |

## Subscribe

```json theme={null}
{
  "op": "subscribe",
  "event": "condition_metrics",
  "min_volume_usd": 1000,
  "timeframes": ["5m", "1h"]
}
```

## Response

<Info>
  **Volume on Polymarket vs. Struct.** Polymarket's UI reports "volume" as notional (the count of shares or contracts traded), which corresponds to `shares_volume` in Struct payloads. `usd_volume` is the dollar value of those trades. Use `shares_volume` to match figures shown on Polymarket and `usd_volume` for true USD throughput.
</Info>

```json theme={null}
{
  "event": "condition_metrics",
  "timestamp": 1775913505260,
  "data": {
    "condition_id": "0x4fec624c0ff2bfae89956cebd6fbc9c58f995f824382dc587dc5a32a4b15940b",
    "timeframe": "5m",
    "volume_usd": 15230.50,
    "shares_volume": 23430.0,
    "builder_usd_volume": 3850.0,
    "builder_shares_volume": 5920.0,
    "fees": 152.30,
    "builder_fees": 38.5,
    "txns": 47,
    "builder_txns": 12,
    "unique_traders": 23,
    "unique_builder_traders": 6
  }
}
```

Each payload includes builder-attributed counterparts for volume, fees, transactions, and unique traders so you can monitor builder-routed activity separately.
