Futures volumepairlist to account for contract size
This commit is contained in:
parent
11fbfd3402
commit
b53791fef2
@ -186,6 +186,7 @@ class VolumePairList(IPairList):
|
|||||||
needed_pairs, since_ms=since_ms, cache=False
|
needed_pairs, since_ms=since_ms, cache=False
|
||||||
)
|
)
|
||||||
for i, p in enumerate(filtered_tickers):
|
for i, p in enumerate(filtered_tickers):
|
||||||
|
contract_size = self._exchange.markets[p['symbol']].get('contractSize', 1.0) or 1.0
|
||||||
pair_candles = candles[
|
pair_candles = candles[
|
||||||
(p['symbol'], self._lookback_timeframe, self._def_candletype)
|
(p['symbol'], self._lookback_timeframe, self._def_candletype)
|
||||||
] if (
|
] if (
|
||||||
@ -199,6 +200,7 @@ class VolumePairList(IPairList):
|
|||||||
|
|
||||||
pair_candles['quoteVolume'] = (
|
pair_candles['quoteVolume'] = (
|
||||||
pair_candles['volume'] * pair_candles['typical_price']
|
pair_candles['volume'] * pair_candles['typical_price']
|
||||||
|
* contract_size
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Exchange ohlcv data is in quote volume already.
|
# Exchange ohlcv data is in quote volume already.
|
||||||
|
Loading…
Reference in New Issue
Block a user