Merge branch 'develop' into feat/short

This commit is contained in:
Matthias
2022-01-01 19:16:24 +01:00
75 changed files with 593 additions and 314 deletions

View File

@@ -150,6 +150,7 @@ class FreqtradeBot(LoggingMixin):
self.rpc.cleanup()
cleanup_db()
self.exchange.close()
def startup(self) -> None:
"""
@@ -841,7 +842,7 @@ class FreqtradeBot(LoggingMixin):
trades_closed += 1
except DependencyException as exception:
logger.warning('Unable to exit trade %s: %s', trade.pair, exception)
logger.warning(f'Unable to exit trade {trade.pair}: {exception}')
# Updating wallets if any trade occurred
if trades_closed:
@@ -1099,9 +1100,13 @@ class FreqtradeBot(LoggingMixin):
if max_timeouts > 0 and canceled_count >= max_timeouts:
logger.warning(f'Emergencyselling trade {trade}, as the sell order '
f'timed out {max_timeouts} times.')
self.execute_trade_exit(
trade, order.get('price'),
sell_reason=SellCheckTuple(sell_type=SellType.EMERGENCY_SELL))
try:
self.execute_trade_exit(
trade, order.get('price'),
sell_reason=SellCheckTuple(sell_type=SellType.EMERGENCY_SELL))
except DependencyException as exception:
logger.warning(
f'Unable to emergency sell trade {trade.pair}: {exception}')
def cancel_all_open_orders(self) -> None:
"""