reuse buy_limit_requested as rate input for custom entry price

This commit is contained in:
axel 2021-08-03 16:39:35 -04:00
parent 42e24d8b4b
commit 16146357b3

View File

@ -481,11 +481,10 @@ class FreqtradeBot(LoggingMixin):
# Calculate price
buy_limit_requested = self.exchange.get_rate(pair, refresh=True, side="buy")
if self.config.get('use_custom_entry_price', False):
buy_rate = self.exchange.get_rate(pair, refresh=True, side="buy")
custom_entry_price = strategy_safe_wrapper(self.strategy.custom_entry_price,
default_retval=stake_amount)(
pair=pair, current_time=datetime.now(timezone.utc),
current_rate=buy_rate)
current_rate=buy_limit_requested)
buy_limit_requested = custom_entry_price