How PnL works in X-Perps?
Note: this article is for verified users trading X-Perps in the EEA region.
This article explains how PnL (profit and loss) works in X-Perps, so you can understand what your account is showing and why your net result may differ from the raw price move. In X-Perps trading, PnL (profit and loss) is commonly shown in two forms: unrealized PnL and realized PnL.
What's unrealized PnL in X-Perps?
Unrealized PnL is the gain or loss in an open position based on current pricing. It is “unrealized” because the position is still open — the result can continue to change until you close.
On OKX, unrealized PnL for X-Perps is calculated using the mark price, not the last traded price. The mark price is also used in liquidation logic.
This means unrealized losses are not just a display value — they directly affect your position risk. If unrealized losses increase and the mark price moves closer to your liquidation price, your margin buffer may shrink. In that case, you may need to add margin (where supported) or reduce your position to lower risk. If you take no action, the position may be liquidated under platform risk rules.
What's realized PnL in X-Perps?
Realized PnL is the gain or loss that becomes final when a position (or part of a position) is closed.
What does the PnL% shown next to my X-Perps position mean?
PnL% measures your PnL against the margin the position used, not against the price move.
PnL is the gain or loss from the price move alone: position size multiplied by the difference between the mark price and your average open price.
PnL% is the same PnL divided by the margin the position used when you opened it.
Which margin figure is used depends on your margin mode:
Single-currency margin, and isolated margin: PnL% = PnL / initial margin. Initial margin is position value divided by leverage, so PnL% is calculated after leverage, not before it.
Multi-currency margin: PnL% = PnL / position-opening margin.
Worked example, single-currency margin. You open a 1,500 USDC position at 3x leverage, so your initial margin is 500 USDC. The market moves 1% in your favour:
PnL is about 15 USDC — 1% of the 1,500 USDC position
PnL% is about 3% — 15 USDC divided by 500 USDC of initial margin
Neither figure is wrong when the two disagree. PnL tells you what trade was made or lost; PnL% tells you how hard the margin you committed worked.For the full formulas in each margin mode, see Calculation of contract's profit and loss.
Why doesn't the PnL% on my X-Perps position include trading fees and funding?
Both the numerator and the denominator of PnL% are built from price and position size only, so fees and funding don't enter the calculation.
Trading fees and funding payments change your account balance and your net result, but they don't change the PnL% shown on the position. PnL% is not a return on your total cost.
Margin you add or remove after opening changes your margin balance and your liquidation price, but not the PnL% denominator, which stays at the margin the position used when it was opened.
To see what fees and funding did to a trade, check your transaction history and fee details rather than the PnL% on the position.
Why is my spot PnL% different from my X-Perps PnL%?
Spot PnL% and X-Perps PnL% are two different measures that share a name.
Spot PnL% is measured against your average cost. No margin and no leverage are involved.
X-Perps PnL% is measured against the margin the position used when you opened it, so leverage is already reflected in the figure.
Because the two use different bases, comparing one against the other doesn't tell you which position performed better. For how spot PnL% is calculated, see Crypto profit & loss analysis (PnL) FAQ.
Why does my X-Perps net result differ from the "price move"?
Your net result can be affected by more than the difference between entry and exit price. It may also include:
trading fees
funding payments
partial closes and execution timing
What should I check in the app to understand my X-Perps PnL?
When reviewing your performance, look at both your position-level PnL and your transaction history and fee details. This helps you understand whether a result came mainly from price movement, fees, or funding effects.
To learn more about OKX products, visit here.