Maintenance Margin = Notional Value x ( Maintenance Margin% + Taker Fee% + | Funding Rate% | )
*Assign a 0 Funding Rate % for negative funding rate percentages when holding long positions, and for positive percentages when holding short positions.*
Notional Value = Mark Price x Position Size x Contract Multiplier
For example, when you buy long contracts of BTC with the following conditions:
- Market Price: 40,000 USDT
- Mark Price: 40,001 USDT
- Position Size: 10,000 (contracts)
- Contract Multiplier: 0.00001
- Maintenance Margin: 0.50%
- Taker Fee%: 0.05%
- Fund Rate%: 0.01%
Given the above conditions, the maintenance margin of this position will be: 40,001 x 10,000 x 0.00001 x ( 0.5% + 0.05% + | 0.01% | ) = 22.40056 USDT
How is the maintenance margin (position margin) calculated in hedge mode?
Maintenance Margin = min( Long Position Size, | Short Position Size | ) * Entry Price * Contract Multiplier * Rate + ( | Position Size | - min( Long Position Size, | Short Position Size | ) ) * Contract Multiplier * Mark Price * Rate
Rate = Maintenance Margin% + Taker Fee% + | Funding Rate% |
*Assign a 0 Funding Rate % for negative funding rate percentages when holding long positions, and for positive percentages when holding short positions. *
For example, when you buy positions of BTC with the following conditions:
- Market Price: 40,000 USDT
- Mark Price: 40,001 USDT
- Long Position Size: +20,000 (contracts)
- Entry Price of Long Position: 39,000 USDT
- Short Position Size: -10,000 (contracts)
- Entry Price of Short position: 39,990 USDT
- Contract Multiplier: 0.00001
- Maintenance Margin: 0.50%
- Taker Fee%: 0.05%
- Funding Rate%: 0.01%
Hence the maintenance margin of the long position will be:
min( 20000, | -10000 | ) * 39,000 * 0.00001 * ( 0.5% + 0.05% + | 0.01% | ) + ( 20000 - min( 20000, | -10000 | ) ) * 0.00001 * 40,001 * ( 0.5% + 0.05% + | 0.01% | ) = 44.24056
The maintenance margin of the short position will be:
min( 20000, | -10000 | ) * 39,990 * 0.00001 * ( 0.5% + 0.05% ) + ( | -10000 | - min( 20000, | -10000 | ) ) * 0.00001 * 40,001 * ( 0.5% + 0.05% ) = 21.9945
How is the liquidation price calculated in one-way mode?
Liquidation price of long position = (Notional Value - (Available Balance + Position Margin) ) / ( (1-Rate) * Position Size * Contract Multiplier )
Liquidation price of short position = (Notional Value + (Available Balance + Position Margin) ) / ( (1+Rate) * Position Size * Contract Multiplier )
Notional Value = Mark Price * Position Size * Contract Multiplier
Position Margin = Notional Value * Rate
Rate = Maintenance Margin% + Taker Fees% + | Funding Rate% |
*Assign a 0 Funding Rate % for negative funding rate percentages when holding long positions, and for positive percentages when holding short positions.*
For example, you have a BTC Perpetual long position with the following conditions:
- Position Size: 10,000 contracts
- Contract Multiplier: 0.00001
- Entry Price: 40,000 USDT
- Mark Price: 41,000 USDT
- Maintenance Margin%: 0.50%
- Taker Fee %: 0.05 %
- Funding Fee %: 0.01 %
- Available Balance: 300 USDT
Given the above conditions, the liquidation price of the long position will be:
( 41,000 * 10000 * 0.00001 - ( 300 + 41,000 * 10000 * 0.00001 * ( 0.5% + 0.05% + | 0.01% | ) ) ) / ( (1 - ( 0.5% + 0.05% + | 0.01% | ) ) * 10000 * 0.00001 ) = 37,983.10539
How is the liquidation price calculated in hedge mode?
Calculate the Net Position Size first. If the direction of Net Position is long, you can use the long liquidation price formula. If the direction of Net Position is short, you can use the short liquidation price formula.
Net Position Size = Long Position Size + Short Position Size
Liquidation Price of Long Position = ( Net Notional Value - ( Available Balance + Position Margin of Net Position size ) ) / ( (1-Rate) * Net Position Size * Contract Multiplier )
Liquidation Price of Short Position = ( Net Notional Value + ( Available Balance + Position Margin of Net Position size ) / ( (1+Rate) * Net Position Size * Contract Multiplier )
Net Notional Value = Mark Price * | Net Position Size | * Contract Multiplier
Position Margin of Net Position Size = Net Notional Value * Rate
Rate = Maintenance Margin% + Taker Fees% + | Funding Rate% |
*Assign 0 Funding Rate% for negative funding rate percentages when holding long positions, and for positive percentages when holding short positions. *
For example, you have BTC Perpetual Positions with the following conditions:
- Long Position Size: +20,000 (contracts)
- Short Position Size: -10,000 (contracts)
- Contract Multiplier: 0.00001
- Mark Price: 41,000 USDT
- Maintenance Margin%: 0.50%
- Taker Fee %: 0.05 %
- Funding Fee %: 0.01 %
- Available Balance: 300 USDT
Hence the liquidation price of this market will be:
Net Position Size = 20000 + (-10000) = 10000
Net Notional Value = 41,000 * | 10000 | * 0.00001 = 4,100
Rate = 0.5% + 0.05% + | 0.01% | = 0.56%
Position Margin of Net Position size = 4,100 * 0.56% = 22.96
Liquidation Price = ( 4,100 - ( 300 + 22.96 ) ) / ( ( 1 - 0.56% ) * 10000 * 0.00001 ) = 37,983.10539