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

# WebSocket Message Schemas

> Generated WebSocket command inventory for 0xArchive subscriptions, replay flows, required command fields, and event coverage boundaries.

This bridge is generated from `internal/websocket-schema.json`. The contract lists command names, command required fields, and event names. It does not publish a standalone AsyncAPI contract or full event payload field schemas, so this page does not invent event JSON Schema blocks. Use [WebSocket Message Schema](/websocket/schema) for the human command and event contract.

## Command Inventory

| Command         | Required fields                               |
| --------------- | --------------------------------------------- |
| `subscribe`     | op, channel, symbol                           |
| `unsubscribe`   | op, channel, symbol                           |
| `replay`        | op, channel\_or\_channels, symbol, start, end |
| `replay.pause`  | op                                            |
| `replay.resume` | op                                            |
| `replay.seek`   | op, timestamp                                 |
| `replay.stop`   | op                                            |
| `ping`          | op                                            |

## Event Inventory

| Event                  | Schema coverage                                                                  |
| ---------------------- | -------------------------------------------------------------------------------- |
| `subscribed`           | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `unsubscribed`         | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `pong`                 | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `data`                 | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `l4_snapshot`          | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `l4_batch`             | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `replay_started`       | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `replay_snapshot`      | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `historical_data`      | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `historical_tick_data` | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `replay_paused`        | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `replay_resumed`       | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `replay_completed`     | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `replay_stopped`       | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `gap_detected`         | Name only; full field schema is not present in `internal/websocket-schema.json`. |
| `error`                | Name only; full field schema is not present in `internal/websocket-schema.json`. |

## subscribe Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "subscribe command",
  "type": "object",
  "required": [
    "op",
    "channel",
    "symbol"
  ],
  "properties": {
    "op": {
      "const": "subscribe"
    },
    "channel": {},
    "symbol": {}
  },
  "additionalProperties": true
}
```

## unsubscribe Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "unsubscribe command",
  "type": "object",
  "required": [
    "op",
    "channel",
    "symbol"
  ],
  "properties": {
    "op": {
      "const": "unsubscribe"
    },
    "channel": {},
    "symbol": {}
  },
  "additionalProperties": true
}
```

## replay Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "replay command",
  "type": "object",
  "required": [
    "op",
    "channel_or_channels",
    "symbol",
    "start",
    "end"
  ],
  "properties": {
    "op": {
      "const": "replay"
    },
    "channel_or_channels": {},
    "symbol": {},
    "start": {},
    "end": {}
  },
  "additionalProperties": true
}
```

## replay.pause Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "replay.pause command",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "const": "replay.pause"
    }
  },
  "additionalProperties": true
}
```

## replay.resume Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "replay.resume command",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "const": "replay.resume"
    }
  },
  "additionalProperties": true
}
```

## replay.seek Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "replay.seek command",
  "type": "object",
  "required": [
    "op",
    "timestamp"
  ],
  "properties": {
    "op": {
      "const": "replay.seek"
    },
    "timestamp": {}
  },
  "additionalProperties": true
}
```

## replay.stop Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "replay.stop command",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "const": "replay.stop"
    }
  },
  "additionalProperties": true
}
```

## ping Command

```json theme={"theme":"github-dark"}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ping command",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "const": "ping"
    }
  },
  "additionalProperties": true
}
```
