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

# Account Summary Stream

This stream provides your account balance, margin usage, and PnL. Issue an
`emitOptionsAccountSummary` request to receive the current summary; this also subscribes you
to ongoing `optionsAccountSummary` updates — there is no separate `subscribe` value.

### Account Summary Request

#### Request

```json theme={null}
{
  "message": "emitOptionsAccountSummary",
  "content": {
    "clientRequestId": "4cc68b60-ed2d-42aa-a21e-cb5486f8fd1a"
  }
}
```

| Field                     | Type   | Required | Description                           |
| ------------------------- | ------ | -------- | ------------------------------------- |
| `message`                 | string | Yes      | `emitOptionsAccountSummary`           |
| `content.clientRequestId` | string | No       | Client-generated UUID for correlation |

<Note>
  The account summary spans your whole account — there is no `market` filter.
</Note>

#### Response

```json theme={null}
{
  "resultType": "optionsAccountSummary",
  "data": {
    "accountBalance": "19611.7711628",
    "availableBalance": "10779.4531133985",
    "totalEquity": "19755.1769719",
    "marginUsed": "8975.7238585015",
    "initialMargin": "8975.7238585015",
    "initialMarginRatio": "0.4543479347853313",
    "maintenanceMargin": "1170.2238585015",
    "maintenanceMarginRatio": "0.0592363136086323",
    "withdrawableBalance": "10636.0473042985",
    "unrealizedPnl": "143.4058091",
    "pnl": "158.080282",
    "fees": "37.0449692",
    "volume": "13551.78",
    "statusCode": 200,
    "clientRequestId": "9bbfd749-1a4b-45d3-9b57-63472a3c5711"
  }
}
```

| Field                         | Type   | Required | Description                                                |
| ----------------------------- | ------ | -------- | ---------------------------------------------------------- |
| `resultType`                  | string | Yes      | `optionsAccountSummary`                                    |
| `data.accountBalance`         | string | Yes      | Total account balance                                      |
| `data.availableBalance`       | string | Yes      | Balance available for new orders                           |
| `data.totalEquity`            | string | Yes      | Total account equity (account balance plus unrealized PnL) |
| `data.marginUsed`             | string | Yes      | Margin currently in use                                    |
| `data.initialMargin`          | string | Yes      | Initial margin requirement across open positions           |
| `data.initialMarginRatio`     | string | Yes      | Initial margin as a fraction of total equity               |
| `data.maintenanceMargin`      | string | Yes      | Maintenance margin requirement across open positions       |
| `data.maintenanceMarginRatio` | string | Yes      | Maintenance margin as a fraction of total equity           |
| `data.withdrawableBalance`    | string | Yes      | Balance available to withdraw                              |
| `data.unrealizedPnl`          | string | Yes      | Unrealized PnL across open positions                       |
| `data.pnl`                    | string | Yes      | Cumulative realized PnL                                    |
| `data.fees`                   | string | Yes      | Cumulative fees                                            |
| `data.volume`                 | string | Yes      | Cumulative traded volume                                   |
| `data.statusCode`             | number | Yes      | `200`                                                      |
| `data.clientRequestId`        | string | No       | Client-generated UUID for correlation                      |

After the initial response, `optionsAccountSummary` messages are pushed automatically as
your balance, margin, and PnL change.
