USDT Margined Perpetual Contract Margin and Profit/Loss Calculations 1. Opening Margin
The opening margin consists of two components:
Including the opening loss (if any) at the time of order placement helps prevent immediate liquidation due to unfavorable price movement at the time of opening.
1.1 Initial Margin
Initial Margin = Notional Value Leverage \text{Initial Margin} = \frac{\text{Notional Value}}{\text{Leverage}} Initial Margin = Leverage Notional Value For USDT-margined contracts:
Notional Value = Order Price × Quantity × Contract Size \text{Notional Value} = \text{Order Price} \times \text{Quantity} \times \text{Contract Size} Notional Value = Order Price × Quantity × Contract Size 1.2 Opening Loss
Opening Loss = Quantity × Contract Size × ∣ min ( 0 , Order Direction × ( Mark Price − Order Price ) ) ∣ \text{Opening Loss} = \text{Quantity} \times \text{Contract Size} \times \left| \min \left( 0,\ \text{Order Direction} \times (\text{Mark Price} - \text{Order Price}) \right) \right| Opening Loss = Quantity × Contract Size × ∣ min ( 0 , Order Direction × ( Mark Price − Order Price ) ) ∣ Where:
Order Direction = 1
for Long, -1
for Short
Example
Order Quantity : 10,000 contracts
Contract Size : 0.0001 BTC
Initial Margin = 60 , 000 × 10 , 000 × 0.0001 10 = 6 , 000 USDT \text{Initial Margin} = \frac{60,000 \times 10,000 \times 0.0001}{10} = 6,000\ \text{USDT} Initial Margin = 10 60 , 000 × 10 , 000 × 0.0001 = 6 , 000 USDT Opening Loss = 10 , 000 × 0.0001 × 5 , 000 = 5 , 000 USDT \text{Opening Loss} = 10,000 \times 0.0001 \times 5,000 = 5,000\ \text{USDT} Opening Loss = 10 , 000 × 0.0001 × 5 , 000 = 5 , 000 USDT Opening Margin = 6 , 000 + 5 , 000 = 11 , 000 USDT \text{Opening Margin} = 6,000 + 5,000 = 11,000\ \text{USDT} Opening Margin = 6 , 000 + 5 , 000 = 11 , 000 USDT 2. Average Opening Price
When a trader opens multiple positions , the system recalculates the average opening price using a weighted average :
Average Opening Price = ∑ ( Contract Quantity × Price ) ∑ Contract Quantity \text{Average Opening Price} = \frac{\sum (\text{Contract Quantity} \times \text{Price})}{\sum \text{Contract Quantity}} Average Opening Price = ∑ Contract Quantity ∑ ( Contract Quantity × Price ) Example
Position 1: 0.5 BTC at 5,000 USDT
Position 2: 0.3 BTC at 6,000 USDT
Total Value = ( 0.5 × 5 , 000 ) + ( 0.3 × 6 , 000 ) = 2 , 500 + 1 , 800 = 4 , 300 \text{Total Value} = (0.5 \times 5,000) + (0.3 \times 6,000) = 2,500 + 1,800 = 4,300 Total Value = ( 0.5 × 5 , 000 ) + ( 0.3 × 6 , 000 ) = 2 , 500 + 1 , 800 = 4 , 300 Total Quantity = 0.5 + 0.3 = 0.8 BTC \text{Total Quantity} = 0.5 + 0.3 = 0.8\ \text{BTC} Total Quantity = 0.5 + 0.3 = 0.8 BTC Average Opening Price = 4 , 300 0.8 = 5 , 375 USDT \text{Average Opening Price} = \frac{4,300}{0.8} = 5,375\ \text{USDT} Average Opening Price = 0.8 4 , 300 = 5 , 375 USDT 3. Profit and Loss Calculation
The unrealized profit and loss (PnL) is shown in real time and calculated differently for long and short positions.
For Long Positions
PnL = Quantity × ( Mark Price − Average Opening Price ) \text{PnL} = \text{Quantity} \times (\text{Mark Price} - \text{Average Opening Price}) PnL = Quantity × ( Mark Price − Average Opening Price ) Example:
PnL = 0.2 × ( 7 , 500 − 7 , 000 ) = 100 USDT \text{PnL} = 0.2 \times (7,500 - 7,000) = 100\ \text{USDT} PnL = 0.2 × ( 7 , 500 − 7 , 000 ) = 100 USDT For Short Positions
PnL = Quantity × ( Average Opening Price − Mark Price ) \text{PnL} = \text{Quantity} \times (\text{Average Opening Price} - \text{Mark Price}) PnL = Quantity × ( Average Opening Price − Mark Price ) Example:
PnL = 0.4 × ( 6 , 000 − 5 , 000 ) = 400 USDT \text{PnL} = 0.4 \times (6,000 - 5,000) = 400\ \text{USDT} PnL = 0.4 × ( 6 , 000 − 5 , 000 ) = 400 USDT Last updated 2 months ago