From e8101a6da59c0b6ed6125d2504b9d45d72016da7 Mon Sep 17 00:00:00 2001 From: gcarq Date: Tue, 14 Nov 2017 17:48:19 +0100 Subject: [PATCH] default BaseVolume to 0.0 if null --- freqtrade/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/main.py b/freqtrade/main.py index cee797be6..d44478d7d 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -287,7 +287,7 @@ def gen_pair_whitelist(base_currency: str, topn: int = 20, key: str = 'BaseVolum """ summaries = sorted( (s for s in exchange.get_market_summaries() if s['MarketName'].startswith(base_currency)), - key=lambda s: s[key], + key=lambda s: s.get(key) or 0.0, reverse=True ) return [s['MarketName'].replace('-', '_') for s in summaries[:topn]]