Key Terminologies and Formulas
| Term | Definition & Calculation |
|------|--------------------------|
| Size | Number of contracts held (long = positive, short = negative in One-way mode; both positive in Hedge mode). |
| Entry Price | Adjusted when adding/reversing positions or during settlement:
Coin-margined: (Current Size + Added Size) / (Current Size / Entry Price + Added Size / New Entry Price)
U-stablecoin-margined: (Current Size × Entry Price + Added Size × New Entry Price) / (Current Size + Added Size) |
| Floating PnL | Coin-margined:
Long: Face Value × |Size| × Multiplier × (1/Entry Price - 1/Mark Price)
Short: Face Value × |Size| × Multiplier × (1/Mark Price - 1/Entry Price)
U-stablecoin-margined:
Long: Face Value × |Size| × Multiplier × (Mark Price - Entry Price)
Short: Face Value × |Size| × Multiplier × (Entry Price - Mark Price) |
| Floating PnL Ratio | (Floating PnL / Position Margin) × 100% |
| Closed PnL | Similar to Floating PnL but uses close price instead of mark price. |
| Settlement PnL | Uses settlement price instead of mark/close price. |
| Realized PnL | Closed PnL + Settlement PnL + Trading Fees |
| Realized PnL Ratio | (Realized PnL / Closed Position’s Margin) × 100% |
👉 Learn advanced trading strategies
Practical Examples
1. Calculating Entry Price
Scenario (U-stablecoin-margined):
- Initial position: 10 contracts at 100,000 USDT.
- Added position: 5 contracts at 160,000 USDT.
Calculation:(10 × 100,000 + 5 × 160,000) / (10 + 5) = 120,000 USDT
Scenario (Coin-margined):
- Short position: 10 contracts at 100,000 USD.
- Added short: 5 contracts at 80,000 USD.
Calculation:(10 + 5) / (10/100,000 + 5/80,000) ≈ 92,307 USD
2. Floating PnL Computation
U-stablecoin-margined Long Position:
- Face value: 0.01 BTC, Size: 10 contracts, Entry: 100,000 USDT, Mark: 160,000 USDT.
PnL:0.01 × 10 × 1 × (160,000 - 100,000) = 6,000 USDT
Coin-margined Short Position:
- Face value: 100 USD, Size: 1,000 contracts, Entry: 100,000 USD, Mark: 80,000 USD.
PnL:100 × 1,000 × 1 × (1/80,000 - 1/100,000) = 0.25 BTC
3. Floating PnL Ratio
- Floating PnL: 6,000 USDT, Margin: 1,600 USDT.
Ratio:(6,000 / 1,600) × 100% = 375%
👉 Explore margin trading insights
FAQs
Q1: How does settlement affect my entry price?
A1: Settlement replaces your entry price with the settlement price, recalculating PnL based on this new benchmark.
Q2: Why is my realized PnL different from closed PnL?
A2: Realized PnL includes trading fees and settlement adjustments, not just the close price difference.
Q3: Can negative sizes occur in Hedge mode?
A3: No. Hedge mode treats both long/short sizes as positive values.
Q4: How is mark price determined?
A4: Exchanges use aggregated data from major markets to prevent manipulation.
Disclaimer: Trading digital assets involves high risk. Past performance ≠ future results. OKX provides tools but assumes no liability for trading outcomes.
© 2025 OKX. All rights reserved.