-
bitcoin $87959.907984 USD
1.34% -
ethereum $2920.497338 USD
3.04% -
tether $0.999775 USD
0.00% -
xrp $2.237324 USD
8.12% -
bnb $860.243768 USD
0.90% -
solana $138.089498 USD
5.43% -
usd-coin $0.999807 USD
0.01% -
tron $0.272801 USD
-1.53% -
dogecoin $0.150904 USD
2.96% -
cardano $0.421635 USD
1.97% -
hyperliquid $32.152445 USD
2.23% -
bitcoin-cash $533.301069 USD
-1.94% -
chainlink $12.953417 USD
2.68% -
unus-sed-leo $9.535951 USD
0.73% -
zcash $521.483386 USD
-2.87%
How do I calculate profit and loss (PnL) on OKX contracts?
OKX futures PnL depends on contract type and margin mode, with unrealized PnL based on mark price and realized PnL calculated upon closing trades, accounting for fees and funding.
Aug 13, 2025 at 11:35 am
Understanding Profit and Loss (PnL) in OKX Futures Trading
When trading futures contracts on OKX, calculating profit and loss (PnL) is essential to track performance and manage risk effectively. OKX supports both isolated and cross margin modes, and PnL calculations vary slightly depending on the mode and whether the position is open or closed. The PnL is denominated in the settlement currency of the contract, which is typically USDT for USDT-margined contracts and USD for coin-margined contracts.
There are two types of PnL: Realized PnL and Unrealized PnL.
- Unrealized PnL reflects the current profit or loss of an open position based on the latest market price.
- Realized PnL is the actual profit or loss locked in when a position is closed.
Each contract type has specific formulas based on entry price, exit price, leverage, and quantity.
Calculating Unrealized PnL for USDT-Margined Contracts
For USDT-margined perpetual contracts, the unrealized PnL is calculated based on the difference between the current mark price and the entry price. The formula differs for long and short positions.
For a long position:
- Unrealized PnL = (Current Mark Price – Entry Price) × Number of Contracts × Contract Size
For a short position:
- Unrealized PnL = (Entry Price – Current Mark Price) × Number of Contracts × Contract Size
The contract size is fixed per contract and varies by asset. For example, BTC/USDT contracts typically have a contract size of 0.001 BTC per contract. The mark price is used instead of the last traded price to prevent manipulation and ensure fair valuation.
Ensure the following:
- Use the correct contract multiplier as defined by OKX.
- Confirm whether your margin mode is isolated or cross, as liquidation calculations differ.
- Monitor funding fees, which can impact net unrealized PnL over time.
Calculating Realized PnL for Closed Positions
When a position is closed, realized PnL is computed based on the average fill price of the closing trade and the average entry price. The formula mirrors unrealized PnL but uses executed prices.
For a closed long position:
- Realized PnL = (Exit Price – Entry Price) × Number of Contracts Closed × Contract Size
For a closed short position:
- Realized PnL = (Entry Price – Exit Price) × Number of Contracts Closed × Contract Size
If you partially close a position, only the closed portion is considered. OKX displays realized PnL in your wallet history after each trade. Fees are deducted from realized PnL, so taker fees (e.g., 0.05%) must be subtracted to get net profit.
To verify:
- Check the trade details in your order history.
- Confirm the number of contracts closed matches your intent.
- Account for funding payments that occurred during the holding period.
Calculating PnL for Coin-Margined Contracts
Coin-margined contracts (such as BTC-USD-SWAP) are settled in the underlying cryptocurrency (e.g., BTC), not USDT. This affects PnL calculation and display.
For a long position:
- Unrealized PnL (in BTC) = Number of Contracts × Contract Size × (1 / Entry Price – 1 / Mark Price)
For a short position:
- Unrealized PnL (in BTC) = Number of Contracts × Contract Size × (1 / Mark Price – 1 / Entry Price)
The inverse nature arises because the margin and PnL are in BTC. As BTC price fluctuates, the USD value of PnL changes, but the BTC-denominated PnL is calculated using the above formulas.
Important considerations:
- The liquidation price is also calculated in BTC terms.
- Funding rates are paid in BTC.
- Your effective profit in USD depends on the BTC/USD rate at withdrawal.
Using OKX Interface to Monitor PnL
OKX provides real-time PnL tracking in the futures trading interface. Navigate to the Positions tab to view both unrealized and realized PnL.
Key elements displayed:
- Entry Price: Average price at which the position was opened.
- Mark Price: Current fair value used for PnL calculation.
- Unrealized PnL: Shown in USDT or BTC, depending on contract type.
- ROE% (Return on Equity): Calculated as Unrealized PnL / Initial Margin × 100%.
- Leverage: Impacts margin and ROE% but not PnL directly.
To access detailed history:
- Go to Wallet > Transaction History > Derivatives.
- Filter by Futures and select the appropriate contract type.
- Export data for external analysis if needed.
Ensure your margin mode and level are correctly set, as changes affect available balance and PnL visibility.
Common Mistakes in PnL Calculation
Traders often misinterpret PnL due to overlooking key factors. One common error is confusing mark price with last traded price. PnL uses mark price, not the last price, to avoid volatility distortions.
Other pitfalls include:
- Ignoring funding fees, which reduce net profit in long positions during positive funding.
- Misreading contract size, especially for altcoin contracts with smaller multipliers.
- Forgetting that partial closes only realize PnL on the closed portion.
- Not accounting for fees, which are deducted from realized PnL.
To avoid errors:
- Always cross-check calculations with OKX’s displayed values.
- Use test positions with small sizes to verify understanding.
- Enable PnL notifications in settings for real-time alerts.
Frequently Asked Questions
Q: Where can I find my realized PnL on OKX?A: Navigate to Wallet > Transaction History, select Derivatives, and filter by Futures. Realized PnL from closed positions appears here, broken down by contract and time.
Q: Does funding rate affect my PnL calculation?A: Yes. Funding payments are deducted or added to your balance every 8 hours. Long positions pay when funding rate is positive, reducing net PnL. These are reflected in your funding fee history under Wallet.
Q: Why is my Unrealized PnL negative even if the market moved in my favor?A: This can happen if funding fees outweigh price gains, or if you’re trading coin-margined contracts and the underlying asset’s value dropped in USD terms. Also, confirm you’re viewing the correct margin mode and contract type.
Q: How does leverage impact PnL on OKX?A: Leverage amplifies both gains and losses but does not change the PnL formula. Higher leverage reduces the required margin, increasing ROE% for the same price move. However, it also raises liquidation risk, which can prematurely close positions and cap PnL.
Disclaimer:info@kdj.com
The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!
If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.
- DeFi Users Eye a Brighter Horizon: Survey Reports Uncover Widespread Positive Sentiment Amidst Evolving Crypto Landscape
- 2026-02-03 22:05:01
- Crypto's Wild Ride: Token Failures, Meme Coins, and the 2025 Chaos Exposed
- 2026-02-03 21:55:01
- Epstein Files Unseal Echoes of Satoshi Nakamoto and Encrypted Secrets
- 2026-02-03 22:10:02
- OpenAI Unveils GPT-5.2 and Hardware Ambitions: A New Era of AI Innovation
- 2026-02-03 22:05:01
- European Investors Seek Secure Physical Gold Amidst Market Volatility, Exploring Tokenized Solutions
- 2026-02-03 21:55:01
- Palantir's Q4 Earnings: An AI-Fueled Ascent Amid Surging Demand
- 2026-02-03 22:00:01
Related knowledge
How to close a crypto contract position manually or automatically?
Feb 01,2026 at 11:19pm
Manual Position Closure Process1. Log into the trading platform where the contract is active and navigate to the 'Positions' or 'Open Orders' tab. 2. ...
How to understand the impact of Bitcoin ETFs on crypto contracts?
Feb 01,2026 at 04:19pm
Bitcoin ETFs and Market Liquidity1. Bitcoin ETFs introduce institutional capital directly into the spot market, increasing order book depth and reduci...
How to trade DeFi contracts during the current liquidity surge?
Feb 01,2026 at 07:00am
Understanding Liquidity Dynamics in DeFi Protocols1. Liquidity surges in DeFi are often triggered by coordinated capital inflows from yield farming in...
How to use social trading to copy crypto contract experts?
Feb 02,2026 at 07:40am
Understanding Social Trading Platforms1. Social trading platforms integrate real-time market data with user interaction features, enabling traders to ...
How to trade BNB contracts and save on transaction fees?
Feb 03,2026 at 12:39am
Understanding BNB Contract Trading Mechanics1. BNB contracts are derivative instruments traded on Binance Futures, allowing users to gain leveraged ex...
How to build a consistent crypto contract trading plan for 2026?
Feb 02,2026 at 10:59pm
Defining Contract Specifications1. Selecting the underlying asset requires evaluating liquidity depth, historical volatility, and exchange support acr...
How to close a crypto contract position manually or automatically?
Feb 01,2026 at 11:19pm
Manual Position Closure Process1. Log into the trading platform where the contract is active and navigate to the 'Positions' or 'Open Orders' tab. 2. ...
How to understand the impact of Bitcoin ETFs on crypto contracts?
Feb 01,2026 at 04:19pm
Bitcoin ETFs and Market Liquidity1. Bitcoin ETFs introduce institutional capital directly into the spot market, increasing order book depth and reduci...
How to trade DeFi contracts during the current liquidity surge?
Feb 01,2026 at 07:00am
Understanding Liquidity Dynamics in DeFi Protocols1. Liquidity surges in DeFi are often triggered by coordinated capital inflows from yield farming in...
How to use social trading to copy crypto contract experts?
Feb 02,2026 at 07:40am
Understanding Social Trading Platforms1. Social trading platforms integrate real-time market data with user interaction features, enabling traders to ...
How to trade BNB contracts and save on transaction fees?
Feb 03,2026 at 12:39am
Understanding BNB Contract Trading Mechanics1. BNB contracts are derivative instruments traded on Binance Futures, allowing users to gain leveraged ex...
How to build a consistent crypto contract trading plan for 2026?
Feb 02,2026 at 10:59pm
Defining Contract Specifications1. Selecting the underlying asset requires evaluating liquidity depth, historical volatility, and exchange support acr...
See all articles














