Verify sell-rate got a value - otherwise downstream code does not work.

Using PricingException here will cease operation for this pair for this
iteration - postponing handling to the next iteration - where hopefully
a price is again present.
This commit is contained in:
Matthias
2020-06-01 19:45:37 +02:00
parent 84c50bf16c
commit c35f9f8d39
2 changed files with 22 additions and 0 deletions

View File

@@ -676,6 +676,8 @@ class FreqtradeBot:
raise PricingError from e
else:
rate = self.exchange.fetch_ticker(pair)[ask_strategy['price_side']]
if rate is None:
raise PricingError(f"Sell-Rate for {pair} was empty.")
self._sell_rate_cache[pair] = rate
return rate