> ## 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.

# Event Metrics

> Stream aggregated event-level metric updates.

<Note>
  **Room ID:** `polymarket_event_metrics` \
  **Endpoint:** `wss://api.struct.to/ws` \
  **Rate:** 0.025 credits per message
</Note>

Stream aggregated metric updates at the event level. This room provides volume, fee, and activity data rolled up across all markets within an event.

## Subscribe

The `event_slugs` filter is required. You may optionally specify `timeframes` to limit which windows you receive.

### Filters

| Filter          | Type       | Required | Description                                                                                                        |
| --------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `event_slugs`   | `string[]` | Yes      | Events to track by slug                                                                                            |
| `timeframes`    | `string[]` | No       | Timeframe windows to receive updates for                                                                           |
| `subscribe_all` | `boolean`  | No       | Firehose: receive every event's metrics. `event_slugs` are ignored when set; the `timeframes` filter still applies |

### Example

```json theme={null}
{
  "type": "join_room",
  "payload": {
    "room_id": "polymarket_event_metrics"
  }
}
```

```json theme={null}
{
  "type": "room_message",
  "payload": {
    "room_id": "polymarket_event_metrics",
    "message": {
      "action": "subscribe",
      "event_slugs": ["us-presidential-election-2026"]
    }
  }
}
```

### Response

```json theme={null}
{
  "type": "event_metrics_stream_subscribe_response",
  "room_id": "polymarket_event_metrics",
  "data": {
    "event_slugs": ["us-presidential-election-2026"],
    "timeframes": [],
    "rejected": []
  }
}
```

## Events

### `event_metrics_update`

<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>

USD and shares volumes are decimal strings to preserve precision. Builder-attributed fields cover the subset of activity routed through builder-signed orders.

```json theme={null}
{
  "type": "event_metrics_update",
  "room_id": "polymarket_event_metrics",
  "data": {
    "event_slug": "us-presidential-election-2026",
    "timeframe": "1h",
    "timestamp": 1743500000,
    "usd_volume": "2500000.00",
    "shares_volume": "3850000.00",
    "builder_usd_volume": "620000.00",
    "builder_shares_volume": "955000.00",
    "fees": 5000.0,
    "builder_fees": 1240.0,
    "txns": 12400,
    "builder_txns": 3100,
    "unique_traders": 3200,
    "unique_builder_traders": 820
  }
}
```
