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

> Balance, margin used, and PnL.

This stream provides your account balance, margin usage, and PnL. Subscribe with the `optionsAccountSummary` subscription, then request a snapshot with `emitOptionsAccountSummary`.

<Note>
  `emitOptionsAccountSummary` returns the **current snapshot** — it does not subscribe you. Subscribe to `optionsAccountSummary` explicitly with [subscribe](/latest/options/websocket-api/common-requests), or list it in the `subscriptions` query parameter when you connect. Without the subscription the snapshot you asked for is published to a channel you are not listening on, and you receive nothing.
</Note>

<Note>
  The account summary is account-wide — `emitOptionsAccountSummary` takes no `market`, and any contract filter is ignored when you subscribe to `optionsAccountSummary`.
</Note>

#### Keeping the Summary Current

There is no delta on this stream and no spontaneous push — a snapshot is only ever sent in response to an `emitOptionsAccountSummary`. To track the account live, re-emit after events that move your balance — order fills on the [Order Creation Stream](/latest/options/websocket-api/order-creation-stream) and settlements on the [Settlements Stream](/latest/options/websocket-api/settlements-stream) — or on a timer. `totalEquity` and the margin ratios also depend on the mark price, so re-emit on [Contracts Stream](/latest/options/websocket-api/contracts-stream) updates if you need them to track the market between balance changes.

See [Account Equity & Balances](/latest/options/formulas/account-balance) for how `totalEquity`, `availableBalance`, and the margin ratios are derived.


## AsyncAPI

````yaml latest/options/asyncapi/options-ws.yaml accountSummaryStream
id: accountSummaryStream
title: Account Summary Stream
description: >
  Available on the `optionsAccountSummary` subscription. Your account balance,
  margin usage, and PnL. `emitOptionsAccountSummary` returns the current
  snapshot and does not subscribe you — without the subscription the snapshot
  never reaches you, and nothing is pushed on its own. The summary is
  account-wide; the emit takes no `market`, and any contract filter is ignored.
servers:
  - id: sandbox
    protocol: wss
    host: ws.sandbox.rails.xyz
    bindings: []
    variables: []
address: >-
  ?product=options&market={market}&expiration={expiration}&strike={strike}&type={type}&subscriptions=optionsAccountSummary
parameters:
  - id: market
    jsonSchema:
      type: string
      description: A specific market (e.g. `BTC-USDT`) or `ALL`.
      default: BTC-USDT
    description: A specific market (e.g. `BTC-USDT`) or `ALL`.
    type: string
    required: true
    deprecated: false
  - id: expiration
    jsonSchema:
      type: string
      description: >-
        Contract expiration, e.g. `24JUN26`. Requires `market`; omit to match
        every expiration.
      default: 24JUN26
    description: >-
      Contract expiration, e.g. `24JUN26`. Requires `market`; omit to match
      every expiration.
    type: string
    required: true
    deprecated: false
  - id: strike
    jsonSchema:
      type: string
      description: >-
        Strike price, e.g. `62000`. Requires `expiration`; omit to match every
        strike.
      default: '62000'
    description: >-
      Strike price, e.g. `62000`. Requires `expiration`; omit to match every
      strike.
    type: string
    required: true
    deprecated: false
  - id: type
    jsonSchema:
      type: string
      description: '`C` (call) or `P` (put). Requires `strike`; omit to match both.'
      default: C
    description: '`C` (call) or `P` (put). Requires `strike`; omit to match both.'
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_1
    id: emitOptionsAccountSummary
    title: Emit options account summary
    description: >-
      Request the current account summary snapshot. Requires the
      `optionsAccountSummary` subscription for the response to reach you.
    type: receive
    messages:
      - &ref_3
        id: emitOptionsAccountSummaryRequest
        contentType: application/json
        payload:
          - name: Emit Options Account Summary
            description: >
              Returns the current snapshot; does not subscribe you. Requires an
              active `optionsAccountSummary` subscription for the response to
              reach you. Account-wide, so `market` is ignored.
            type: object
            properties:
              - name: message
                type: string
                description: Always `emitOptionsAccountSummary`.
                required: true
              - name: content
                type: object
                required: false
                properties:
                  - name: clientRequestId
                    type: string
                    description: Client-generated UUID for correlation
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            message:
              type: string
              description: Always `emitOptionsAccountSummary`.
              x-parser-schema-id: <anonymous-schema-475>
            content:
              type: object
              properties:
                clientRequestId:
                  type: string
                  format: uuid
                  description: Client-generated UUID for correlation
                  x-parser-schema-id: <anonymous-schema-477>
              x-parser-schema-id: <anonymous-schema-476>
          required:
            - message
          x-parser-schema-id: <anonymous-schema-474>
        title: Emit Options Account Summary
        description: >
          Returns the current snapshot; does not subscribe you. Requires an
          active `optionsAccountSummary` subscription for the response to reach
          you. Account-wide, so `market` is ignored.
        example: |-
          {
            "message": "emitOptionsAccountSummary",
            "content": {
              "clientRequestId": "4cc68b60-ed2d-42aa-a21e-cb5486f8fd1a"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: emitOptionsAccountSummaryRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: accountSummaryStream
  - &ref_2
    id: optionsAccountSummaryUpdate
    title: Options account summary update
    description: >-
      Response to `emitOptionsAccountSummary`. Delivered only while subscribed
      to `optionsAccountSummary`; nothing is pushed on its own.
    type: send
    messages:
      - &ref_4
        id: optionsAccountSummaryResponse
        contentType: application/json
        payload:
          - name: Account Summary
            description: >
              Response to `emitOptionsAccountSummary`. Delivered only while
              subscribed to `optionsAccountSummary`; nothing is pushed on its
              own.
            type: object
            properties:
              - name: resultType
                type: string
                description: Always `optionsAccountSummary`.
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: accountSummary
                    type: object
                    required: true
                    properties:
                      - name: accountBalance
                        type: string
                        description: Total account balance
                        required: true
                      - name: availableBalance
                        type: string
                        description: Balance available for new orders
                        required: true
                      - name: totalEquity
                        type: string
                        description: >-
                          Account equity — account balance plus the signed mark
                          value of open positions
                        required: true
                      - name: marginUsed
                        type: string
                        description: >-
                          Margin currently in use — the initial margin locked by
                          open positions and resting orders
                        required: true
                      - name: initialMarginRatio
                        type: string
                        description: '`marginUsed` as a fraction of total equity'
                        required: true
                      - name: maintenanceMargin
                        type: string
                        description: Maintenance margin requirement across open positions
                        required: true
                      - name: maintenanceMarginRatio
                        type: string
                        description: Maintenance margin as a fraction of total equity
                        required: true
                      - name: withdrawableBalance
                        type: string
                        description: Balance available to withdraw
                        required: true
                      - name: unrealizedPnl
                        type: string
                        description: >-
                          Unrealized PnL across open positions. Reporting only —
                          not a term in `totalEquity`
                        required: true
                      - name: pnl
                        type: string
                        description: Cumulative realized PnL
                        required: true
                      - name: fees
                        type: string
                        description: Cumulative fees
                        required: true
                      - name: volume
                        type: string
                        description: Cumulative traded volume
                        required: true
                  - name: statusCode
                    type: integer
                    description: Always `200`.
                    required: true
                  - name: clientRequestId
                    type: string
                    description: Client-generated UUID for correlation
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            resultType:
              type: string
              description: Always `optionsAccountSummary`.
              x-parser-schema-id: <anonymous-schema-479>
            data:
              type: object
              properties:
                accountSummary:
                  type: object
                  properties:
                    accountBalance:
                      type: string
                      description: Total account balance
                      x-parser-schema-id: <anonymous-schema-482>
                    availableBalance:
                      type: string
                      description: Balance available for new orders
                      x-parser-schema-id: <anonymous-schema-483>
                    totalEquity:
                      type: string
                      description: >-
                        Account equity — account balance plus the signed mark
                        value of open positions
                      x-parser-schema-id: <anonymous-schema-484>
                    marginUsed:
                      type: string
                      description: >-
                        Margin currently in use — the initial margin locked by
                        open positions and resting orders
                      x-parser-schema-id: <anonymous-schema-485>
                    initialMarginRatio:
                      type: string
                      description: '`marginUsed` as a fraction of total equity'
                      x-parser-schema-id: <anonymous-schema-486>
                    maintenanceMargin:
                      type: string
                      description: Maintenance margin requirement across open positions
                      x-parser-schema-id: <anonymous-schema-487>
                    maintenanceMarginRatio:
                      type: string
                      description: Maintenance margin as a fraction of total equity
                      x-parser-schema-id: <anonymous-schema-488>
                    withdrawableBalance:
                      type: string
                      description: Balance available to withdraw
                      x-parser-schema-id: <anonymous-schema-489>
                    unrealizedPnl:
                      type: string
                      description: >-
                        Unrealized PnL across open positions. Reporting only —
                        not a term in `totalEquity`
                      x-parser-schema-id: <anonymous-schema-490>
                    pnl:
                      type: string
                      description: Cumulative realized PnL
                      x-parser-schema-id: <anonymous-schema-491>
                    fees:
                      type: string
                      description: Cumulative fees
                      x-parser-schema-id: <anonymous-schema-492>
                    volume:
                      type: string
                      description: Cumulative traded volume
                      x-parser-schema-id: <anonymous-schema-493>
                  required:
                    - accountBalance
                    - availableBalance
                    - totalEquity
                    - marginUsed
                    - initialMarginRatio
                    - maintenanceMargin
                    - maintenanceMarginRatio
                    - withdrawableBalance
                    - unrealizedPnl
                    - pnl
                    - fees
                    - volume
                  x-parser-schema-id: <anonymous-schema-481>
                statusCode:
                  type: integer
                  description: Always `200`.
                  x-parser-schema-id: <anonymous-schema-494>
                clientRequestId:
                  type: string
                  description: Client-generated UUID for correlation
                  x-parser-schema-id: <anonymous-schema-495>
              required:
                - accountSummary
                - statusCode
              x-parser-schema-id: <anonymous-schema-480>
          required:
            - resultType
            - data
          x-parser-schema-id: <anonymous-schema-478>
        title: Account Summary
        description: >
          Response to `emitOptionsAccountSummary`. Delivered only while
          subscribed to `optionsAccountSummary`; nothing is pushed on its own.
        example: |-
          {
            "resultType": "optionsAccountSummary",
            "data": {
              "accountSummary": {
                "accountBalance": "19611.7711628",
                "availableBalance": "10636.0473042985",
                "totalEquity": "20504.4429067",
                "marginUsed": "8975.7238585015",
                "initialMarginRatio": "0.4377453169219538",
                "maintenanceMargin": "1170.2238585015",
                "maintenanceMarginRatio": "0.0570717216666793",
                "withdrawableBalance": "10537.4473042985",
                "unrealizedPnl": "343.8117439",
                "pnl": "158.080282",
                "fees": "37.0449692",
                "volume": "13551.78"
              },
              "statusCode": 200,
              "clientRequestId": "9bbfd749-1a4b-45d3-9b57-63472a3c5711"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: optionsAccountSummaryResponse
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
extensions:
  - id: x-parser-unique-object-id
    value: accountSummaryStream
securitySchemes:
  - id: wsAuth
    name: Sec-WebSocket-Protocol
    type: httpApiKey
    description: Supply as `authorization#<JWT>` during the WebSocket handshake.
    in: header
    extensions: []

````