Add orderbook sell rate to sell_rate_cache

This commit is contained in:
Matthias 2020-05-30 10:59:26 +02:00
parent 9f8b21de4a
commit 57e951dbce
1 changed files with 3 additions and 0 deletions

View File

@ -719,6 +719,9 @@ class FreqtradeBot:
raise PricingError from e
logger.debug(f" order book {config_ask_strategy['price_side']} top {i}: "
f"{sell_rate:0.8f}")
# Assign sell-rate to cache - otherwise sell-rate is never updated in the cache,
# resulting in outdated RPC messages
self._sell_rate_cache[trade.pair] = sell_rate
if self._check_and_execute_sell(trade, sell_rate, buy, sell):
return True