Understanding Key Concepts
Contract Size
- Definition: The number of contracts or the crypto/fiat value held in a position.
One-way Mode:
- Long positions: Positive size
- Short positions: Negative size
- Hedge Mode: Both long and short positions show positive sizes.
Entry Price Dynamics
Entry prices adjust when:
- Increasing position size
- Reverse-opening positions
- Settlement (replaces entry price with settlement price)
Formulas:
👉 Discover advanced trading strategies
Coin-margined Contracts:
Entry Price = (Current Size + Added Size) / (Current Size / Entry Price + Added Size / Added Size's Entry Price)U-stablecoin-margined Contracts:
Entry Price = (Current Size × Entry Price + Added Size × Added Size's Entry Price) / (Current Size + Added Size)Profit and Loss Calculations
| Metric | Formula | Notes | ||
|---|---|---|---|---|
| Floating PnL | Unrealized gains/losses | |||
| Coin-margined (Long) | `Face Value × | Size | × Multiplier × (1/Entry Price - 1/Mark Price)` | |
| Coin-margined (Short) | `Face Value × | Size | × Multiplier × (1/Mark Price - 1/Entry Price)` | |
| USDT-margined (Long) | `Face Value × | Size | × Multiplier × (Mark Price - Entry Price)` | |
| USDT-margined (Short) | `Face Value × | Size | × Multiplier × (Entry Price - Mark Price)` | |
| Floating PnL Ratio | (Floating PnL / Position Margin) × 100% | Measures ROI | ||
| Closed PnL | Realized upon position closure | |||
| Coin-margined (Long) | Replace "Mark Price" with "Close Price" in Floating PnL formula | |||
| USDT-margined (Short) | Replace "Mark Price" with "Close Price" in Floating PnL formula | |||
| Settlement PnL | Replace "Mark Price" with "Settlement Price" in Floating PnL formulas | Occurs at contract expiry | ||
| Realized PnL | Closed PnL + Settlement PnL + Trading Fees | Includes all finalized gains/losses | ||
| Realized PnL Ratio | (Realized PnL / Closed Position's Margin) × 100% | Post-trade performance |
Practical Examples
Example 1: Entry Price Calculation
USDT-margined Contract
- Current Position: 10 contracts @ 100,000 USDT
Added Position: 5 contracts @ 160,000 USDT
(100,000×10 + 160,000×5) / (10+5) = 120,000 USDT
Coin-margined Contract
- Current Position: 10 contracts @ 100,000 USD
Added Position: 5 contracts @ 80,000 USD
(10+5) / (10/100,000 + 5/80,000) = 92,307 USD
👉 Optimize your entry strategies
Example 2: Floating PnL
USDT-margined Long Position
- Face Value: 0.01 BTC
- Size: 10 contracts
Entry: 100,000 USDT | Mark: 160,000 USDT
0.01 × 10 × (160,000 - 100,000) = 6,000 USDT profit
Coin-margined Short Position
- Face Value: 100 USD
- Size: 1,000 contracts
Entry: 100,000 USD | Mark: 80,000 USD
× 1,000 × (1/80,000 - 1/100,000) = 0.25 BTC profit
Example 3: PnL Ratios
Floating PnL Ratio
- Floating PnL: 6,000 USDT
Margin: 1,600 USDT
(6,000 / 1,600) × 100% = 375%
FAQ Section
1. How does leverage affect PnL calculations?
Leverage amplifies both gains and losses but doesn't change the underlying PnL formulas. It impacts margin requirements and liquidation risks.
2. Why do entry prices change when adding to positions?
The system calculates a weighted average price to reflect your true cost basis across multiple entries.
3. What's the difference between Floating and Realized PnL?
- Floating: Potential profit if you closed now
- Realized: Actual profit from completed trades
4. How often are mark prices updated?
Mark prices typically update in real-time to ensure accurate PnL reflection.
5. Do fees impact PnL calculations?
Yes, trading fees are factored into Realized PnL but not Floating PnL.
6. Can PnL ratios exceed 100%?
Absolutely, especially with high leverage or significant price movements.
Risk Disclosure
Digital asset trading involves substantial risk. Leverage magnifies volatility exposure, potentially leading to total margin loss. Past performance never guarantees future results. Consult financial advisors to assess suitability. OKX provides no investment warranties—users bear full responsibility for trading decisions.
© 2025 OKX. All rights reserved.