Improve error-handling

This commit is contained in:
Matthias
2023-05-02 21:40:44 +02:00
parent 13974d2508
commit 0d1d25e868
+3 -1
View File
@@ -1824,6 +1824,7 @@ class FreqtradeBot(LoggingMixin):
# Must also run for partial exits
# TODO: Margin will need to use interest_rate as well.
# interest_rate = self.exchange.get_interest_rate()
try:
trade.set_liquidation_price(self.exchange.get_liquidation_price(
pair=trade.pair,
open_rate=trade.open_rate,
@@ -1833,7 +1834,8 @@ class FreqtradeBot(LoggingMixin):
leverage=trade.leverage,
wallet_balance=trade.stake_amount,
))
except DependencyException:
logger.warning('Unable to calculate liquidation price')
# Updating wallets when order is closed
self.wallets.update()
Trade.commit()