Calculation of contract‘s profit and loss

Опубліковано 21 квіт. 2026 р.Оновлено 29 квіт. 2026 р.6 хв читання
Ця інформація може стосуватися не всіх клієнтів
Увійдіть, щоб перевірити, чи стосується вас інформація про продукти, функції, правила й умови, викладені в цій статті.

1. Single-currency margin: Selected margin

In single-currency margin mode, X-Perps support both Hedge mode and One-way mode

(1)Hedge mode

(2)One-way mode

Term Definition
Total For the One-way mode, the total of long positions is a positive number, and the total of short positions is a negative number.
Avail. Only shown in Hedge mode Avail. = total positions – positions of pending close orders
P&L Unrealized profit or loss of current position (1) Coin-margined X-Perps swap P&L of long positions = face value * |number of contracts|* multiplier * (1 / avg. open price – 1 / mark price) P&L of short positions = face value * |number of contracts| * multiplier * (1 / mark price – 1 / avg. open price) (2) USD-margined X-Perps swapP&L of long positions = face value * |number of contracts| * multiplier * (mark price – avg. open price) P&L of short positions = face value * |number of contracts| * multiplier * (avg. open price - mark price)
P&L ratio P&L/initial margin
Initial margin 1) Coin-margined X-Perps swap Initial margin = face value * |number of contracts| * multiplier / (mark price * leverage)2) USD-margined X-Perps swap Initial margin = face value * |number of contracts| * multiplier * mark price / leverage
Maintenance margin 1) Coin-margined X-Perps swap Maintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio / mark price2) USD-margined X-Perps swapMaintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio * mark price

2. Multi-currency margin mode

Under the multi-currency margin mode, X-Perps support both Hedge and One-way mode

Term Definition
Total For the One-way mode, the total of long positions is a positive number, and the total of short positions is a negative number.
Avail. Only shown under Hedge mode Avail. = Total – Positions of pending close orders

PnL
Unrealized profit and loss of current positions
(1) Crypto-margined X-Perps swap
PnL of long positions = Face value * |Number of contracts| * Multiplier * (1/Avg. open price – 1/Mark price)
PnL of short positions = Face value * |Number of contracts| * Multiplier * (1/Mark price – 1/Avg. open price)
(2) USD margined X-Perps swap
PnL of long positions = Face value * |Number of contracts| * Multiplier * (Mark price – Avg. open price)
PnL of short positions = Face value * |Number of contracts| * Multiplier * (Avg. open price – Mark price)
PnL ratio PnL/Position-opening margin
Initial margin
(1) Crypto-margined X-Perps swap
Initial margin = Face value * |Number of contracts| * Multiplier / (Mark price * leverage)
(2) USD-margined X-Perps swap
Initial margin = Face value * |Number of contracts| * Multiplier * Mark price / Leverage
Maintenance margin (1) Crypto-margined X-Perps swap
Maintenance margin = Face value * |Number of contracts| * Multiplier * Maintenance margin ratio / Mark price
(2) USD margined X-Perps swap
Maintenance margin = Face value * |Number of contracts| * Multiplier * Maintenance margin ratio * Mark price

3. The isolated mode of Single/Multi-currency margin

In isolated margin mode, X-Perps support both Hedge mode and One-way mode

Term Definition
Total For the One-way mode, the total of long positions is a positive number, and the total of short positions is a negative number.
Avail. Only shown in Hedge mode Avail. = total – positions of pending close orders
P&L Unrealized profit or loss of current position(1)Coin-margined X-Perps swapP&L of long positions = face value * |contracts| * multiplier * (1 / avg. open price – 1 / mark price)P&L of short positions = face value * |contracts| * multiplier * (1 / mark price – 1 / avg. open price)(2)USD-margined X-Perps swapP&L of long positions = face value * |contracts| * multiplier * (mark price – avg. open price)P&L of short positions = face value * |contracts| * multiplier * (avg. open price – mark price)
P&L ratio P&L/initial margin
liquidation price (1)Coin-margined X-Perps swapLong positions: Est. liquidation price = face value * |number of contracts| * (maintenance margin ratio + fee rate + 1) / (margin balance + face value * |number of contracts| / avg. open price)Short positions: Est. liquidation price = face value * |number of contracts| * (maintenance margin ratio + fee rate - 1) / (margin balance - face value * |number of contracts| / avg. open price)(2)USD-margined X-Perps swapLong positions: Est. liquidation price = (margin balance - face value * |number of contracts| * avg. open price) / [face value * |number of contracts| * (maintenance margin ratio + fee rate - 1)]Short positions: Est. liquidation price = (margin balance + face value * |number of contracts| * avg. open price) / [face value * |number of contracts| * (maintenance margin ratio + fee rate + 1)]
Margin balance Initial margin + margin added to or reduced from this position
Maintenance margin (1)Coin-margined X-Perps swapMaintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio / mark price(2)USD-margined X-Perps swapMaintenance margin = face value * |number of contracts| * multiplier * maintenance margin ratio * mark price
Margin level (Margin balance + P&L) / [position value * (maintenance margin ratio + fee rate)] (1) Coin-margined X-Perps swap Margin level = (margin balance + P&L)/ [face value * |number of contracts| / mark price * (maintenance margin ratio + fee rate)] (2) USD-margined X-Perps swap Margin level = (margin balance + P&L)/ [face value * |number of contracts| * mark price * (maintenance margin ratio + fee rate)]


Disclaimer:

This content is provided for informational purposes only and may cover products that are not available in your region. It does not constitute investment or financial product advice, not it is a recommendation or solicitation to buy or sell financial instruments or to engage in any specific trading strategy.

Trading in financial instruments involves a significant risk of loss and may not be suitable for all investors. If you invest in X-Perps or other derivatives you may lose some or all of the money you invest. X-Perps are leveraged instruments; leverage can amplify both gains and losses. The value of investments and any income derived from them can go down as well as up, and you may not recover the amount originally invested. Past performance is not a reliable indicator of future results. You should carefully consider your investment objectives, level of experience, and risk appetite before engaging in any trading activity.

OKX Europe Markets Ltd ("OEM"), which is authorised and regulated by the Malta Financial Services Authority (MFSA) under the Investment Services Act (Chapter 370 of the Laws of Malta) as a Investment Services Licence Holder (Licence No. OEML-15905).

© 2026 OKX. This article may be reproduced or distributed in its entirety, or excerpts of 100 words or less of this article may be used, provided such use is non-commercial. Any reproduction or distribution of the entire article must also prominently state: “This article is © 2026 OKX and is used with permission.”

Permitted excerpts must cite to the name of the article and include attribution, for example “Article Name, [author name if applicable], © 2026 OKX. Some content may be generated or assisted by artificial intelligence (AI) tools. No derivative works or other uses of this article are permitted.