-
bitcoin $82105.423623 USD
1.53% -
ethereum $2450.135255 USD
3.92% -
tether $0.998720 USD
-0.01% -
bnb $730.284647 USD
1.87% -
xrp $1.339614 USD
2.68% -
usd-coin $0.999856 USD
-0.01% -
solana $106.273474 USD
4.10% -
tron $0.333992 USD
0.92% -
zcash $1226.171121 USD
12.26% -
hyperliquid $81.288422 USD
2.19% -
dogecoin $0.082255 USD
3.12% -
monero $560.080824 USD
4.45% -
chainlink $12.528568 USD
4.20% -
cardano $0.230972 USD
5.05% -
unus-sed-leo $9.031004 USD
0.04%
How to Calculate Unrealized PnL on OKX
Unrealized PnL in crypto derivatives—like on OKX—is the floating profit/loss on open positions, calculated in real time using mark price (not last price), impacts margin and liquidation risk, but isn’t taxed or settled until closure.
Oct 16, 2026 at 10:00 pm
Understanding Unrealized PnL in Crypto Derivatives
1. Unrealized PnL refers to the profit or loss on open positions that have not yet been closed. It reflects the difference between the entry price and the current market price, scaled by position size and contract multiplier.
2. On OKX, this value is recalculated continuously using the latest mark price—not the last traded price—to ensure fairness amid volatile market conditions.
3. Unlike realized PnL, unrealized PnL does not affect account equity until the position is closed or liquidated. However, it directly influences margin utilization and liquidation risk assessment.
4. For inverse perpetual contracts, unrealized PnL is denominated in the base asset (e.g., BTC), while for USDT-margined contracts, it is expressed in USDT.
5. The system displays unrealized PnL separately for each open position in the 'Positions' tab, with color-coded indicators: green for gains and red for losses.
Mathematical Formulation per Contract Type
1. For long positions in USDT-margined linear contracts: (Mark Price − Entry Price) × Position Size × Contract Multiplier.
2. For short positions in USDT-margined linear contracts: (Entry Price − Mark Price) × Position Size × Contract Multiplier.
3. For inverse perpetual contracts (e.g., BTC-USD): (1 ÷ Entry Price − 1 ÷ Mark Price) × Position Size × Face Value, where face value is typically 1 USD.
4. In coin-margined futures, unrealized PnL impacts wallet balance in the settlement asset—meaning BTC-denominated PnL changes the BTC wallet balance directly.
5. Funding payments are excluded from unrealized PnL calculations; they are accounted for separately as realized cash flows upon each funding interval.
Real-Time Data Sources on OKX
1. OKX uses a proprietary mark price mechanism combining index price, bid-ask midpoint, and decaying premium to prevent manipulation during illiquid periods.
2. The index price aggregates real-time feeds from multiple spot exchanges weighted by volume and reliability—Binance, Coinbase, Kraken, and Bybit contribute to the OKX Index.
3. Mark price updates occur every 200 milliseconds during active trading hours and are published via WebSocket streams under the publicTickers channel.
4. Users accessing API endpoints such as GET /api/v5/account/positions receive fields including upl (unrealized PnL) and avgPx (average entry price).
5. Historical unrealized PnL cannot be retrieved retroactively via public APIs—only the current snapshot is served per request.
Impact of Risk Limit Tiers and Leverage
1. Higher risk limit tiers allow larger positions but do not alter the formula for unrealized PnL—only the maximum allowable position size changes.
2. Leverage settings influence initial margin and maintenance margin thresholds, indirectly affecting when unrealized losses trigger margin calls.
3. When leverage is adjusted post-entry, unrealized PnL remains unchanged—the calculation basis stays anchored to original entry price and size.
4. Cross-margin mode pools all available balance to absorb unrealized losses; isolated margin restricts loss absorption to the designated margin amount only.
5. A position under isolated margin with zero available margin will enter forced liquidation if unrealized loss exceeds allocated margin—even if the overall account holds surplus funds elsewhere.
Frequently Asked Questions
Q: Does unrealized PnL include funding fees?A: No. Funding fees are settled separately at fixed intervals and appear as realized PnL entries in the transaction history.
Q: Why does my unrealized PnL differ from what I calculate manually using last price?A: OKX uses mark price—not last price—for PnL computation. Mark price incorporates index data and spread adjustments to resist volatility spikes.
Q: Can unrealized PnL turn negative even if the market hasn’t moved since entry?A: Yes. If funding rates shift significantly or index composition changes, the mark price may diverge from entry price without spot movement.
Q: Is unrealized PnL taxable upon generation?A: Tax treatment depends on jurisdiction. Most regulatory frameworks consider it non-taxable until realization through closure or liquidation.
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.
- Bitcoin ETFs Face Headwinds as Pepeto, from Pepe's Cofounder, Bucks the Trend with Stellar Presale
- 2026-10-16 12:45:01
- Thailand Gears Up for Bitcoin & Ether ETFs Amidst Modest Inflow Expectations and Evolving Ether ETF Rules
- 2026-10-16 12:45:01
- Injective (INJ) Price Surges Amidst Institutional Adoption and Regulatory Milestones, Yet Wash Trading Looms
- 2026-10-16 12:50:01
- XRP News Surges with AI Payments Milestone, Traders Eyeing Pepeto's Presale Potential
- 2026-10-16 08:35:01
- CLARITY Act Hangs in Balance as Rep. Bryan Steil Faces Tight Wisconsin Election
- 2026-10-16 05:25:01
- Vitalik Buterin Declares zkEVM Speed Race Over, Urges Developers to Prioritize Security
- 2026-10-16 05:15:02
Related knowledge
How to Check the APR of USDT Flexible Savings on OKX
Oct 15,2026 at 10:00pm
Understanding APR in OKX Flexible Savings1. APR stands for Annual Percentage Rate and reflects the nominal yearly return on USDT deposits without comp...
How to Stop Copying a Trader on Bitget
Oct 16,2026 at 02:59am
Market Volatility Patterns1. Bitcoin price swings often exceed 15% within a 24-hour window during major macroeconomic announcements. 2. Altcoin indice...
How to Check Your Copy Trading Profit Share on Bybit
Oct 16,2026 at 10:19am
Bitcoin Halving Mechanics1. Bitcoin’s protocol enforces a fixed schedule where block rewards are cut in half approximately every 210,000 blocks, or ro...
How to Check Whether a Binance Spot Order Is Partially Filled
Oct 16,2026 at 07:40am
Understanding Order Status Fields1. The status field in Binance’s order response indicates the current lifecycle stage: NEW, PARTIALLY_FILLED, FILLED,...
How to Sort Crypto Trading Pairs by 24-Hour Volume on KuCoin
Oct 16,2026 at 02:19am
Accessing the Trading Pairs Interface1. Navigate to the KuCoin official website and log in to your account using valid credentials. 2. Click on the Ma...
How to Check the Spot-Futures Price Difference on Gate.io
Oct 16,2026 at 01:59pm
Understanding Spot-Futures Basis on Gate.io1. The spot-futures price difference—commonly called the basis—is calculated as futures price minus spot in...
How to Check the APR of USDT Flexible Savings on OKX
Oct 15,2026 at 10:00pm
Understanding APR in OKX Flexible Savings1. APR stands for Annual Percentage Rate and reflects the nominal yearly return on USDT deposits without comp...
How to Stop Copying a Trader on Bitget
Oct 16,2026 at 02:59am
Market Volatility Patterns1. Bitcoin price swings often exceed 15% within a 24-hour window during major macroeconomic announcements. 2. Altcoin indice...
How to Check Your Copy Trading Profit Share on Bybit
Oct 16,2026 at 10:19am
Bitcoin Halving Mechanics1. Bitcoin’s protocol enforces a fixed schedule where block rewards are cut in half approximately every 210,000 blocks, or ro...
How to Check Whether a Binance Spot Order Is Partially Filled
Oct 16,2026 at 07:40am
Understanding Order Status Fields1. The status field in Binance’s order response indicates the current lifecycle stage: NEW, PARTIALLY_FILLED, FILLED,...
How to Sort Crypto Trading Pairs by 24-Hour Volume on KuCoin
Oct 16,2026 at 02:19am
Accessing the Trading Pairs Interface1. Navigate to the KuCoin official website and log in to your account using valid credentials. 2. Click on the Ma...
How to Check the Spot-Futures Price Difference on Gate.io
Oct 16,2026 at 01:59pm
Understanding Spot-Futures Basis on Gate.io1. The spot-futures price difference—commonly called the basis—is calculated as futures price minus spot in...
See all articles














