How to calculate liquidation price

Liquidation is an automatic procedure that occurs if the reserved margin is no longer sufficient to cover further losses from a position. If liquidation occurs, all currently open deals will be automatically closed at market price.

General formulas for calculating liquidation price:

Liq Price (Long) = OpenPrice - (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC * OpenPrice

Liq Price (Short) = OpenPrice + (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC * OpenPrice ,

where, OpenOrderCommission is:

MakerFee 0.1% for a LIMIT type of order

TakerFee 0.2% for a MARKET type of order

and CloseOrderCommission is:

TakerFee 0.2%

In such calculations, trade fee fractions are rounded up

EXAMPLE of calculation of liquidation price (Limit Order):

OpenOrderCommission = SizeBTC * MakerFee = 0.01 * 0.001 = 0.00001 BTC

CloseOrderCommission = SizeBTC * TakerFee = 0.01 * 0.002 = 0.00002 BTC

  1. For LONG deals:
    • Liq Price (Long) = OpenPrice - (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC * OpenPrice
    • Liq Price (Long) = 10000 - (0.0001 - OpenOrderCommission - CloseOrderCommission - 0.01*0) / (100 * 0.0001) * 10000 = 10000 - (0.0001 - 0,01 * 0,001 - 0,01 * 0,001 - 0.01*0) / 0.01 * 10000
    • Liq Price (Long) = 9930.0
  2. For SHORT deals:
    • Liq Price (Short) = OpenPrice + (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC * OpenPrice
    • Liq Price (Short) = 10000 + (0.0001 - OpenOrderCommission - CloseOrderCommission - 0.01*0) / (100 * 0.0001) * 10000 = 10000 + (0.0001 - 0.01 * 0.001 - 0.01 * 0.002 - 0.01*0) / 0.01 * 10000
    • Liq Price (Short) = 10070.00
EXAMPLE of calculation of liquidation price (Market order):

OpenOrderCommission = SizeBTC * TakerFee = 0.01 * 0.002 = 0.00002 BTC

CloseOrderCommission = SizeBTC * TakerFee = 0.01 * 0.002 = 0.00002 BTC

  1. For LONG positions:
    • Liq Price (Long) = OpenPrice - (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC * OpenPrice
    • Liq Price (Long) = 10000 - (0.0001 — OpenOrderCommission — CloseOrderCommission — 0.01*0)/(100 * 0.0001) * 10000 = 10000 — (0.0001 - 0.00002001 - 0.00002001- 0.01*0) / 0.01 * 10000
    • Liq Price (Long) = 9940.00
  2. For SHORT positions:
    • Liq Price (Short) = OpenPrice + (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC * OpenPrice ,
    • Liq Price (Short) = 10000 + (0.0001 - OpenOrderCommission - CloseOrderCommission - 0.01*0) / (100 * 0.0001) * 10000 = 10000 + (0.0001- 0.00002001 - 0.00002001- 0.01*0) / 0.01 * 10000
    • Liq Price (Short) = 10059.98