From 42b82415411b5d90bf8aa46d5fcf59dc57a317c7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 16 Aug 2019 10:26:20 +0200 Subject: [PATCH] use gz to save / load trades data --- freqtrade/data/history.py | 2 +- tests/data/test_history.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/history.py b/freqtrade/data/history.py index e47ddf6c8..b487ea56e 100644 --- a/freqtrade/data/history.py +++ b/freqtrade/data/history.py @@ -175,7 +175,7 @@ def pair_data_filename(datadir: Path, pair: str, ticker_interval: str) -> Path: def pair_trades_filename(datadir: Path, pair: str) -> Path: pair_s = pair.replace("/", "_") - filename = datadir.joinpath(f'{pair_s}-trades.json') + filename = datadir.joinpath(f'{pair_s}-trades.json.gz') return filename diff --git a/tests/data/test_history.py b/tests/data/test_history.py index 55b8fe1d1..032c1b306 100644 --- a/tests/data/test_history.py +++ b/tests/data/test_history.py @@ -145,7 +145,7 @@ def test_pair_data_filename(): def test_pair_trades_filename(): fn = pair_trades_filename(Path('freqtrade/hello/world'), 'ETH/BTC') assert isinstance(fn, Path) - assert fn == Path('freqtrade/hello/world/ETH_BTC-trades.json') + assert fn == Path('freqtrade/hello/world/ETH_BTC-trades.json.gz') def test_load_cached_data_for_updating(mocker) -> None: