Positions & PnL

A position is your exposure to one perp market: long gains when the price rises, short gains when it falls. Each account holds at most one position per market, and buying or selling adds to it, reduces it or flips it.

Mark price

Positions are valued at the market's mark price: unrealized PnL, margin and liquidations all use it. Each market reads its mark price from its own on-chain oracle, not from the last trade on its order book. A mark price more than 5 seconds old counts as stale, and new positions can't be opened in that market until it updates.

Unrealized PnL

Long:  Unrealized PnL = Size × (Mark price − Entry price)
Short: Unrealized PnL = Size × (Entry price − Mark price)

Entry price

Adding to a position moves its entry price to the size-weighted average of the old entry and the new fill:

New entry price = (Old size × Old entry + Added size × Fill price) / New size

Reducing a position leaves its entry price unchanged.

Realized PnL

Closing all or part of a position locks in its PnL at the price the close fills at:

Long:  Realized PnL = Size closed × (Exit price − Entry price)
Short: Realized PnL = Size closed × (Entry price − Exit price)

Why closing realizes a different number

Unrealized PnL is valued at the mark price. A close is a market order, so it fills against the order book instead: a long sells into the bids and a short buys from the asks, at prices that can differ from the mark. Funding owed on the position also settles at the close.

The close dialog shows the difference before you confirm. Est. exit price is the average price the close would fill at, walking the live book for the size you entered, and PnL if closed now is (Est. exit price − Entry Price) × Size Closed (inverted for shorts). PnL at market value is the same size valued at the mark price, which is not what a close would pay. If the book cannot fill the whole size within the close's 0.5% bound around the mark, the dialog says how much would fill.

Account equity

Equity = USDso balance + Unrealized PnL of every position − Funding owed

USDso held for your resting orders is not part of equity while the orders are open, and liquidation thresholds are measured against equity. See Margin and Funding.

Liquidation price in cross margin. Account health is measured across all your positions. The liquidation price shown for a position is an estimate that assumes only that market moves: the real threshold depends on every open position, your USDso and funding owed.