From b53791fef20990d2a46b9dbf6795fb8cfc490c2f Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 2 Sep 2022 07:11:20 +0200 Subject: [PATCH] Futures volumepairlist to account for contract size --- freqtrade/plugins/pairlist/VolumePairList.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/plugins/pairlist/VolumePairList.py b/freqtrade/plugins/pairlist/VolumePairList.py index 8138a5fb6..d7cc6e5ec 100644 --- a/freqtrade/plugins/pairlist/VolumePairList.py +++ b/freqtrade/plugins/pairlist/VolumePairList.py @@ -186,6 +186,7 @@ class VolumePairList(IPairList): needed_pairs, since_ms=since_ms, cache=False ) for i, p in enumerate(filtered_tickers): + contract_size = self._exchange.markets[p['symbol']].get('contractSize', 1.0) or 1.0 pair_candles = candles[ (p['symbol'], self._lookback_timeframe, self._def_candletype) ] if ( @@ -199,6 +200,7 @@ class VolumePairList(IPairList): pair_candles['quoteVolume'] = ( pair_candles['volume'] * pair_candles['typical_price'] + * contract_size ) else: # Exchange ohlcv data is in quote volume already.