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

# Oracle Events

> Typed UMA oracle lifecycle alerts for Polymarket markets.

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

Fires on every on-chain oracle event affecting a Polymarket market. Use `oracle_event_types` to restrict to specific kinds, and `condition_ids` to narrow by market. The `data` payload is a discriminated union keyed on `event_type`.

## Filters

| Filter               | Type       | Required | Description                                       |
| -------------------- | ---------- | -------- | ------------------------------------------------- |
| `oracle_event_types` | `string[]` | No       | Restrict to specific event types (see list below) |
| `condition_ids`      | `string[]` | No       | Restrict to specific markets                      |

#### Event types

Valid values for `oracle_event_types`:

`AssertionMade`, `AssertionDisputed`, `AssertionSettled`, `RequestPrice`, `ProposePrice`, `DisputePrice`, `Settle`, `QuestionResolved`, `QuestionEmergencyResolved`, `QuestionReset`, `QuestionInitialized`, `QuestionPaused`, `QuestionUnpaused`, `QuestionFlagged`, `QuestionUnflagged`, `ConditionResolution`, `NegRiskOutcomeReported`.

## Subscribe

```json theme={null}
{
  "op": "subscribe",
  "event": "oracle_events",
  "oracle_event_types": ["QuestionResolved", "ConditionResolution"],
  "condition_ids": ["0x4fec624c0ff2bfae89956cebd6fbc9c58f995f824382dc587dc5a32a4b15940b"]
}
```

## Response

The `data` object is a discriminated union keyed on `event_type`. The `QuestionResolved` variant is shown below; full schemas for every variant are documented on the [Oracle Events room](/websockets/rooms/oracle-events) page.

```json theme={null}
{
  "event": "oracle_events",
  "timestamp": 1743500000000,
  "data": {
    "event_type": "QuestionResolved",
    "id": "0xresolved123",
    "hash": "0xresolvedhash",
    "block": 65001400,
    "confirmed_at": 1743501400,
    "log_index": 2,
    "block_index": 0,
    "oracle_contract": "0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49",
    "condition_id": "0x4fec624c0ff2bfae89956cebd6fbc9c58f995f824382dc587dc5a32a4b15940b",
    "settled_price": 1000000000000000000,
    "proposed_outcome": "Yes"
  }
}
```
