File tree Expand file tree Collapse file tree 1 file changed +26
-8
lines changed
Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -182,18 +182,36 @@ def dry_run_liquidation_price(
182182 PERPETUAL:
183183 bybit:
184184 https://www.bybithelp.com/HelpCenterKnowledge/bybitHC_Article?language=en_US&id=000001067
185- https://www.bybit.com/en/help-center/article/Liquidation-Price-Calculation-under-Isolated-Mode-Unified-Trading-Account#b
186-
187- Long:
185+ USDT:
186+ https://www.bybit.com/en/help-center/article/Liquidation-Price-Calculation-under-Isolated-Mode-Unified-Trading-Account#b
187+ USDC:
188+ https://www.bybit.com/en/help-center/article/Liquidation-Price-Calculation-under-Isolated-Mode-Unified-Trading-Account#c
189+
190+ Long USDT:
191+ Liquidation Price = (
192+ Entry Price - [(Initial Margin - Maintenance Margin)/Contract Quantity]
193+ - (Extra Margin Added/Contract Quantity))
194+ Short USDT:
195+ Liquidation Price = (
196+ Entry Price + [(Initial Margin - Maintenance Margin)/Contract Quantity]
197+ + (Extra Margin Added/Contract Quantity))
198+
199+ Long USDC:
188200 Liquidation Price = (
189- Entry Price - [(Initial Margin - Maintenance Margin)/Contract Quantity]
190- - (Extra Margin Added/Contract Quantity))
191- Short:
201+ Position Entry Price - [
202+ (Initial Margin + Extra Margin Added - Maintenance Margin) / Position Size
203+ ]
204+ )
205+
206+ Short USDC:
192207 Liquidation Price = (
193- Entry Price + [(Initial Margin - Maintenance Margin)/Contract Quantity]
194- + (Extra Margin Added/Contract Quantity))
208+ Position Entry Price + [
209+ (Initial Margin + Extra Margin Added - Maintenance Margin) / Position Size
210+ ]
211+ )
195212
196213 Implementation Note: Extra margin is currently not used.
214+ Due to this - the liquidation formula between USDT and USDC is the same.
197215
198216 :param pair: Pair to calculate liquidation price for
199217 :param open_rate: Entry price of position
You can’t perform that action at this time.
0 commit comments