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

# Subscribe

This request adds one or more streams to the current WebSocket connection. Streams must be added with `subscribe` after connecting — they cannot be requested in the
connection URL.

#### Request

```json theme={null}
{
  "message": "subscribe",
  "content": {
    "clientRequestId": "cfff0f58-8780-4cf2-b3d3-6439fed37304",
    "subscriptions": [
      "optionsPositions",
      "optionsOpenOrders",
      "publicOrderBook"
    ]
  }
}
```

| Field                     | Type   | Required | Description                           |
| ------------------------- | ------ | -------- | ------------------------------------- |
| `message`                 | string | Yes      | `subscribe`                           |
| `content.clientRequestId` | string | No       | Client-generated UUID for correlation |
| `content.subscriptions`   | array  | Yes      | One or more subscriptions to add      |

#### Response

```json theme={null}
{
  "resultType": "subscribed",
  "data": {
    "activeSubscriptions": ["orders", "optionsPositions", "optionsOpenOrders", "publicOrderBook"],
    "requestedSubscriptions": ["optionsPositions", "optionsOpenOrders", "publicOrderBook"],
    "clientRequestId": "cfff0f58-8780-4cf2-b3d3-6439fed37304",
    "statusCode": 200
  }
}
```

| Field                         | Type   | Required | Description                                            |
| ----------------------------- | ------ | -------- | ------------------------------------------------------ |
| `resultType`                  | string | Yes      | `subscribed`                                           |
| `data.activeSubscriptions`    | array  | Yes      | All currently active subscriptions after the operation |
| `data.requestedSubscriptions` | array  | Yes      | The subscriptions requested to be added                |
| `data.clientRequestId`        | string | No       | Client-generated UUID for correlation                  |
| `data.statusCode`             | number | Yes      | `200`                                                  |

#### Allowed Subscription Values

| Subscription Value    | Description                                                                               |
| --------------------- | ----------------------------------------------------------------------------------------- |
| `orders`              | Order creation and cancellation requests and notifications (active by default on connect) |
| `optionsContracts`    | Contract definitions with mark price, IV, and Greeks (scoped by underlying + expiration)  |
| `optionsQuotes`       | Top-of-book bid/ask with IV (scoped by underlying + expiration)                           |
| `publicOrderBook`     | Order book snapshots and deltas for a contract                                            |
| `publicTrades`        | Public trade executions for a contract                                                    |
| `optionsPositions`    | Your open positions                                                                       |
| `optionsOpenOrders`   | Your open orders                                                                          |
| `optionsRecentOrders` | Your recent order history                                                                 |
| `optionsSettlements`  | Your settlement results at expiry                                                         |

<Note>
  The account summary stream is managed for you — issue an
  [`emitOptionsAccountSummary`](/latest/options/websocket-api/account-summary-stream) request
  and updates are delivered automatically; it is not a `subscribe` value.
</Note>

#### Behavior

* Only new subscriptions are added to the connection
* Re-subscribing to an already active subscription is a no-op
* Existing subscriptions remain unaffected
* Changes apply immediately
* Safe to call repeatedly (idempotent)
* Does not affect other connections
* Does not require reconnecting
