Skip to main content
The formulas behind each open position — entry value, live valuation, unrealized PnL, and break-even. For the fields as returned, see Get Positions and the Positions Stream. Margin sizing is covered in Margin & Fees.

Notation

Value & Notional Value

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.
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.
See Margin & Fees for how each fill’s fee is priced. fees is on the 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. 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 response and the Positions Stream. Some formula variable names differ from their response field names: liqPrice is always -- on both.