Move create_pair_list to pairlistmanager

This commit is contained in:
hroff-1902
2020-05-18 13:54:21 +03:00
parent 5f2a871637
commit 627c5059f0
6 changed files with 16 additions and 18 deletions

View File

@@ -1,7 +0,0 @@
"""
Common datatypes
"""
from typing import List, Tuple
# List of pairs with their timeframes
ListPairsWithTimeframes = List[Tuple[str, str]]

View File

@@ -9,10 +9,10 @@ from typing import Any, Dict, List, Optional
from pandas import DataFrame
from freqtrade.data.common import ListPairsWithTimeframes
from freqtrade.data.history import load_pair_history
from freqtrade.exceptions import DependencyException, OperationalException
from freqtrade.exchange import Exchange
from freqtrade.pairlist.pairlistmanager import ListPairsWithTimeframes
from freqtrade.state import RunMode
@@ -45,12 +45,6 @@ class DataProvider:
"""
return list(self._exchange._klines.keys())
def create_pair_list(self, pairs: List[str], timeframe: str = None) -> ListPairsWithTimeframes:
"""
Create list of pair tuples with (pair, ticker_interval)
"""
return [(pair, timeframe or self._config['ticker_interval']) for pair in pairs]
def ohlcv(self, pair: str, timeframe: str = None, copy: bool = True) -> DataFrame:
"""
Get candle (OHLCV) data for the given pair as DataFrame