Skip to content

Commit

Permalink
Rename argument from dl_path to datadir
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Oct 13, 2019
1 parent c1c4918 commit 9584629
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions freqtrade/data/history.py
Expand Up @@ -374,7 +374,7 @@ def download_trades_history(datadir: Optional[Path],


def refresh_backtest_trades_data(exchange: Exchange, pairs: List[str], timeframes: List[str],
dl_path: Path, timerange: TimeRange,
datadir: Path, timerange: TimeRange,
erase=False) -> List[str]:
"""
Refresh stored trades data .
Expand All @@ -389,14 +389,14 @@ def refresh_backtest_trades_data(exchange: Exchange, pairs: List[str], timeframe
continue
# for ticker_interval in timeframes:

dl_file = pair_trades_filename(dl_path, pair)
dl_file = pair_trades_filename(datadir, pair)
if erase and dl_file.exists():
logger.info(
f'Deleting existing data for pair {pair}.')
dl_file.unlink()

logger.info(f'Downloading trades for pair {pair}.')
download_trades_history(datadir=dl_path, exchange=exchange,
download_trades_history(datadir=datadir, exchange=exchange,
pair=pair,
timerange=timerange)
return pairs_not_available
Expand Down
3 changes: 1 addition & 2 deletions freqtrade/exchange/exchange.py
Expand Up @@ -997,8 +997,7 @@ def get_fee(self, symbol='ETH/BTC', type='', side='', amount=1,
raise OperationalException(e) from e

def build_ohlcv(self, trades: List[Dict], timeframe: str, since: int = None,
limit: int = None) -> str:
# TODO: fix return value
limit: int = None) -> List:
"""
Build ohlcv data from trade list.
trade-list has to be in the ccxt format, which is a list of dicts containing at least:
Expand Down
2 changes: 1 addition & 1 deletion freqtrade/utils.py
Expand Up @@ -97,7 +97,7 @@ def start_download_data(args: Dict[str, Any]) -> None:
else:
pairs_not_available = refresh_backtest_trades_data(
exchange, pairs=config["pairs"], timeframes=config["timeframes"],
dl_path=Path(config['datadir']), timerange=timerange, erase=config.get("erase"))
datadir=Path(config['datadir']), timerange=timerange, erase=config.get("erase"))

except KeyboardInterrupt:
sys.exit("SIGINT received, aborting ...")
Expand Down

0 comments on commit 9584629

Please sign in to comment.