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

# Position Metrics

The formulas behind each open position — entry value, live valuation, unrealized PnL, and
break-even. For the fields as returned, see
[Get Positions](/latest/options/rest-api/get-account-positions) and the
[Positions Stream](/latest/options/websocket-api/positions-stream). Margin sizing is covered
in [Margin & Fees](/latest/options/formulas/margin-and-fees).

## Notation

| Symbol       | Meaning                                                      |
| ------------ | ------------------------------------------------------------ |
| `qty`        | Signed position size — positive for long, negative for short |
| `entryPrice` | Average entry price — `value ÷ qty`                          |
| `markPrice`  | Current mark price of the contract                           |
| `strike`     | Strike price of the contract                                 |
| `fees`       | Trading fees actually charged to open the current position   |

## Value & Notional Value

| Field           | Formula            | Description                                                                                     |
| --------------- | ------------------ | ----------------------------------------------------------------------------------------------- |
| `value`         | `entryPrice × qty` | Position value at entry, signed (negative for shorts)                                           |
| `notionalValue` | `markPrice × qty`  | Current mark value of the position, signed (negative for shorts); `0` when no mark is available |

`entryPrice` is not returned directly; derive it from `value ÷ qty` — both are signed, so the
result is always positive. `side` (`long` / `short`) is returned alongside and carries the same
direction as the sign of `qty`.

## Unrealized PnL

Unrealized PnL measures the position against its entry price.

```
unrealizedPnl = (markPrice - entryPrice) × qty
```

Because `qty` is signed, this formula handles both directions: a long profits when
`markPrice > entryPrice`, a short when `markPrice < entryPrice`. It is `0` when the mark price
is unavailable.

## Fees

`fees` is the trading fee **actually charged** to build the current open position, not an
estimate. It accumulates as the position is opened and resets to `0` when the position closes.
Reducing the position reduces `fees` in the same proportion — closing half a position leaves
half the fees against the half still open — so that `fees` always reflects only the contracts
you still hold. `fees` is always positive; per-contract fees divide by the position size
regardless of direction.

```
feesPerContract = fees ÷ abs(qty)
```

See [Margin & Fees](/latest/options/formulas/margin-and-fees#fees) for how each fill's fee is
priced. `fees` is on the [Positions Stream](/latest/options/websocket-api/positions-stream)
only — it is not returned over REST.

## Break-Even Price

`breakEvenPrice` is the underlying price at expiry at which the position's **total** PnL is
zero — the payoff at expiry exactly recovers the premium paid or received at entry plus the
opening fees. It is a forward-looking figure over the whole life of the position, so it
corresponds to neither `realizedPnl` nor `unrealizedPnl` as returned.

| Option type | Side  | `breakEvenPrice`                        |
| ----------- | ----- | --------------------------------------- |
| Call        | Long  | `strike + entryPrice + feesPerContract` |
| Call        | Short | `strike + entryPrice − feesPerContract` |
| Put         | Long  | `strike − entryPrice − feesPerContract` |
| Put         | Short | `strike − entryPrice + feesPerContract` |

Fees widen break-even against the holder: they push a long's break-even further out and pull a
short's in.

## Usage in API

These calculations back the [Get Positions](/latest/options/rest-api/get-account-positions)
response and the [Positions Stream](/latest/options/websocket-api/positions-stream). Some
formula variable names differ from their response field names:

| Formula variable  | Response field | Notes                                       |
| ----------------- | -------------- | ------------------------------------------- |
| `entryPrice`      | —              | Not returned; derive from `value ÷ qty`     |
| `feesPerContract` | —              | Not returned; derive from `fees ÷ abs(qty)` |
| `fees`            | `fees`         | Positions Stream only                       |

`liqPrice` is always `--` on both.
