mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Move binance migration to behind migrations gate
This commit is contained in:
parent
c9dd99a4b5
commit
a12f368796
|
@ -12,7 +12,7 @@ from freqtrade.enums import RunMode, TradingMode
|
|||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.exchange import timeframe_to_minutes
|
||||
from freqtrade.resolvers import ExchangeResolver
|
||||
from freqtrade.util.binance_mig import migrate_binance_futures_data
|
||||
from freqtrade.util.migrations import migrate_data
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -78,7 +78,7 @@ def start_convert_data(args: Dict[str, Any], ohlcv: bool = True) -> None:
|
|||
"""
|
||||
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
|
||||
if ohlcv:
|
||||
migrate_binance_futures_data(config)
|
||||
migrate_data(config)
|
||||
convert_ohlcv_format(config,
|
||||
convert_from=args['format_from'],
|
||||
convert_to=args['format_to'],
|
||||
|
|
|
@ -18,8 +18,8 @@ from freqtrade.exceptions import OperationalException
|
|||
from freqtrade.exchange import Exchange
|
||||
from freqtrade.plugins.pairlist.pairlist_helpers import dynamic_expand_pairlist
|
||||
from freqtrade.util import dt_ts, format_ms_time
|
||||
from freqtrade.util.binance_mig import migrate_binance_futures_data
|
||||
from freqtrade.util.datetime_helpers import dt_now
|
||||
from freqtrade.util.migrations import migrate_data
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -531,7 +531,7 @@ def download_data_main(config: Config) -> None:
|
|||
"Please use `--dl-trades` instead for this exchange "
|
||||
"(will unfortunately take a long time)."
|
||||
)
|
||||
migrate_binance_futures_data(config)
|
||||
migrate_data(config)
|
||||
pairs_not_available = refresh_backtest_ohlcv_data(
|
||||
exchange, pairs=expanded_pairs, timeframes=config['timeframes'],
|
||||
datadir=config['datadir'], timerange=timerange,
|
||||
|
|
|
@ -38,7 +38,7 @@ from freqtrade.rpc.rpc_types import (ProfitLossStr, RPCCancelMsg, RPCEntryMsg, R
|
|||
from freqtrade.strategy.interface import IStrategy
|
||||
from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper
|
||||
from freqtrade.util import FtPrecise
|
||||
from freqtrade.util.binance_mig import migrate_binance_futures_names
|
||||
from freqtrade.util.migrations import migrate_binance_futures_names
|
||||
from freqtrade.wallets import Wallets
|
||||
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ from freqtrade.resolvers import ExchangeResolver, StrategyResolver
|
|||
from freqtrade.strategy.interface import IStrategy
|
||||
from freqtrade.strategy.strategy_wrapper import strategy_safe_wrapper
|
||||
from freqtrade.types import BacktestResultType, get_BacktestResultType_default
|
||||
from freqtrade.util.binance_mig import migrate_binance_futures_data
|
||||
from freqtrade.util.migrations import migrate_data
|
||||
from freqtrade.wallets import Wallets
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ class Backtesting:
|
|||
self._can_short = self.trading_mode != TradingMode.SPOT
|
||||
self._position_stacking: bool = self.config.get('position_stacking', False)
|
||||
self.enable_protections: bool = self.config.get('enable_protections', False)
|
||||
migrate_binance_futures_data(config)
|
||||
migrate_data(config)
|
||||
|
||||
self.init_backtest()
|
||||
|
||||
|
|
6
freqtrade/util/migrations/__init__.py
Normal file
6
freqtrade/util/migrations/__init__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from freqtrade.util.migrations.binance_mig import migrate_binance_futures_names # noqa F401
|
||||
from freqtrade.util.migrations.binance_mig import migrate_binance_futures_data
|
||||
|
||||
|
||||
def migrate_data(config):
|
||||
migrate_binance_futures_data(config)
|
|
@ -5,7 +5,7 @@ import shutil
|
|||
import pytest
|
||||
|
||||
from freqtrade.persistence import Trade
|
||||
from freqtrade.util.binance_mig import migrate_binance_futures_data, migrate_binance_futures_names
|
||||
from freqtrade.util.migrations import migrate_binance_futures_data, migrate_binance_futures_names
|
||||
from tests.conftest import create_mock_trades_usdt, log_has
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user