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

# Positions & Account

> Tracking positions, balances, and PnL

Your positions and account state are available both live over WebSocket streams and on
demand via REST endpoints — see each section below for the specific streams and endpoints.

## Positions

Each open position reports its size, entry value, live valuation, margin, and PnL:

| Field                           | Description                                                                                                            |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `contract`                      | Contract name                                                                                                          |
| `side`                          | `long` or `short`                                                                                                      |
| `optionType`                    | `C` (call) or `P` (put), matching the contract name                                                                    |
| `qty`                           | Signed position quantity — positive for long, negative for short                                                       |
| `value`                         | Signed position value at entry — positive for long, negative for short                                                 |
| `notionalValue`                 | Signed current mark value of the position — positive for long, negative for short; `0` when no mark price is available |
| `entryPrice`                    | Average entry price                                                                                                    |
| `markPrice` / `markIV`          | Current mark price and implied volatility                                                                              |
| `underlyingPrice`               | Underlying index price                                                                                                 |
| `fees`                          | Fees accrued opening the position                                                                                      |
| `breakEvenPrice`                | Break-even price, including fees accrued per contract                                                                  |
| `initialMargin`                 | Initial margin held for short positions — not applicable to long positions                                             |
| `realizedPnl` / `unrealizedPnl` | Realized and unrealized PnL                                                                                            |

Stream them on the [Positions Stream](/latest/options/websocket-api/positions-stream) or
fetch them via [Get Positions](/latest/options/rest-api/get-account-positions). See
[Position Metrics](/latest/options/formulas/position-metrics) for how entry value, notional
value, unrealized PnL, and break-even are derived, and
[Margin & Liquidation](/latest/options/guides/margin-and-liquidation) for how margin is
sized.

## Account Summary

Your account-wide balances, margin usage, and PnL are available on the
[Account Summary Stream](/latest/options/websocket-api/account-summary-stream) and via
[Get Account Summary](/latest/options/rest-api/get-account-summary):

| Field                                          | Description                                                                              |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `accountBalance`                               | Total account balance                                                                    |
| `availableBalance`                             | Balance available for new orders                                                         |
| `withdrawableBalance`                          | Balance available to withdraw                                                            |
| `totalEquity`                                  | Account balance plus the signed mark value of every open position                        |
| `marginUsed`                                   | Margin currently in use — the initial margin locked by open positions and resting orders |
| `initialMarginRatio`                           | `marginUsed` as a fraction of total equity                                               |
| `maintenanceMargin` / `maintenanceMarginRatio` | Maintenance margin requirement and its ratio to total equity                             |
| `unrealizedPnl` / `pnl`                        | Unrealized PnL and cumulative realized PnL                                               |
| `fees` / `volume`                              | Cumulative fees and traded volume                                                        |

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

## Deposits & Withdrawals

See [Get Account Deposits](/latest/options/rest-api/get-account-deposits) and
[Get Account Withdrawals](/latest/options/rest-api/get-account-withdrawals) for your recent
deposit and withdrawal transactions.
