Liquidation
Liquidation happens when the position hits the liquidation price or the available margin drops below the maintenance margin. Solvency check for every position happens every hour when the funding is charged.
Similar to other crypto exchange's liquidation engines , liquidation price depends on the bankruptcy price, which is also used to calculate the maintenance margin.
Bankruptcy Price:
For Long positions
For Short positions
Above does not hold true for 1x short position, for which both bankruptcyPrice and liquidationPrice are not calculated
Bankruptcy Value:
Maintenance Margin:
Liquidation Price:
For positionSide, Use +1 for Short Use -1 for Long
Last updated