mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
fix: round liquidation price to precision in a different spot
closes #11110
This commit is contained in:
@@ -3642,7 +3642,7 @@ class Exchange:
|
||||
liquidation_price_buffer = (
|
||||
liquidation_price - buffer_amount if is_short else liquidation_price + buffer_amount
|
||||
)
|
||||
return self.price_to_precision(pair, max(liquidation_price_buffer, 0.0))
|
||||
return max(liquidation_price_buffer, 0.0)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@@ -777,7 +777,9 @@ class LocalTrade:
|
||||
"""
|
||||
if liquidation_price is None:
|
||||
return
|
||||
self.liquidation_price = liquidation_price
|
||||
self.liquidation_price = price_to_precision(
|
||||
liquidation_price, self.price_precision, self.precision_mode_price
|
||||
)
|
||||
|
||||
def set_funding_fees(self, funding_fee: float) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user