@@ -749,6 +749,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
:param pair: pair for which we want to create a LIMIT_BUY
|
:param pair: pair for which we want to create a LIMIT_BUY
|
||||||
:param stake_amount: amount of stake-currency for the pair
|
:param stake_amount: amount of stake-currency for the pair
|
||||||
:return: True if a buy order is created, false if it fails.
|
:return: True if a buy order is created, false if it fails.
|
||||||
|
:raise: DependencyException or it's subclasses like ExchangeError.
|
||||||
"""
|
"""
|
||||||
time_in_force = self.strategy.order_time_in_force['entry']
|
time_in_force = self.strategy.order_time_in_force['entry']
|
||||||
|
|
||||||
@@ -1452,15 +1453,21 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
return
|
return
|
||||||
if adjusted_entry_price:
|
if adjusted_entry_price:
|
||||||
# place new order only if new price is supplied
|
# place new order only if new price is supplied
|
||||||
if not self.execute_entry(
|
try:
|
||||||
pair=trade.pair,
|
if not self.execute_entry(
|
||||||
stake_amount=(
|
pair=trade.pair,
|
||||||
order_obj.safe_remaining * order_obj.safe_price / trade.leverage),
|
stake_amount=(
|
||||||
price=adjusted_entry_price,
|
order_obj.safe_remaining * order_obj.safe_price / trade.leverage),
|
||||||
trade=trade,
|
price=adjusted_entry_price,
|
||||||
is_short=trade.is_short,
|
trade=trade,
|
||||||
mode='replace',
|
is_short=trade.is_short,
|
||||||
):
|
mode='replace',
|
||||||
|
):
|
||||||
|
self.replace_order_failed(
|
||||||
|
trade, f"Could not replace order for {trade}.")
|
||||||
|
except DependencyException as exception:
|
||||||
|
logger.warning(
|
||||||
|
f'Unable to replace order for {trade.pair}: {exception}')
|
||||||
self.replace_order_failed(trade, f"Could not replace order for {trade}.")
|
self.replace_order_failed(trade, f"Could not replace order for {trade}.")
|
||||||
|
|
||||||
def cancel_all_open_orders(self) -> None:
|
def cancel_all_open_orders(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user