Improve error-handling
This commit is contained in:
+12
-10
@@ -1824,16 +1824,18 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
# Must also run for partial exits
|
# Must also run for partial exits
|
||||||
# TODO: Margin will need to use interest_rate as well.
|
# TODO: Margin will need to use interest_rate as well.
|
||||||
# interest_rate = self.exchange.get_interest_rate()
|
# interest_rate = self.exchange.get_interest_rate()
|
||||||
trade.set_liquidation_price(self.exchange.get_liquidation_price(
|
try:
|
||||||
pair=trade.pair,
|
trade.set_liquidation_price(self.exchange.get_liquidation_price(
|
||||||
open_rate=trade.open_rate,
|
pair=trade.pair,
|
||||||
is_short=trade.is_short,
|
open_rate=trade.open_rate,
|
||||||
amount=trade.amount,
|
is_short=trade.is_short,
|
||||||
stake_amount=trade.stake_amount,
|
amount=trade.amount,
|
||||||
leverage=trade.leverage,
|
stake_amount=trade.stake_amount,
|
||||||
wallet_balance=trade.stake_amount,
|
leverage=trade.leverage,
|
||||||
))
|
wallet_balance=trade.stake_amount,
|
||||||
|
))
|
||||||
|
except DependencyException:
|
||||||
|
logger.warning('Unable to calculate liquidation price')
|
||||||
# Updating wallets when order is closed
|
# Updating wallets when order is closed
|
||||||
self.wallets.update()
|
self.wallets.update()
|
||||||
Trade.commit()
|
Trade.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user