diff --git a/docs/faq.md b/docs/faq.md index 50aaa03a3..196bd4308 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -128,12 +128,6 @@ This warning can point to one of the below problems: * Barely traded pair -> Check the pair on the exchange webpage, look at the timeframe your strategy uses. If the pair does not have any volume in some candles (usually visualized with a "volume 0" bar, and a "_" as candle), this pair did not have any trades in this timeframe. These pairs should ideally be avoided, as they can cause problems with order-filling. * API problem -> API returns wrong data (this only here for completeness, and should not happen with supported exchanges). -### I'm getting the "RESTRICTED_MARKET" message in the log - -Currently known to happen for US Bittrex users. - -Read [the Bittrex section about restricted markets](exchanges.md#restricted-markets) for more information. - ### I'm getting the "Exchange XXX does not support market orders." message and cannot run my strategy As the message says, your exchange does not support market orders and you have one of the [order types](configuration.md/#understand-order_types) set to "market". Your strategy was probably written with other exchanges in mind and sets "market" orders for "stoploss" orders, which is correct and preferable for most of the exchanges supporting market orders (but not for Bittrex and Gate.io). diff --git a/freqtrade/freqai/data_drawer.py b/freqtrade/freqai/data_drawer.py index f8b8f0de4..e3027267b 100644 --- a/freqtrade/freqai/data_drawer.py +++ b/freqtrade/freqai/data_drawer.py @@ -284,6 +284,10 @@ class FreqaiDataDrawer: new_pred["date_pred"] = dataframe["date"] hist_preds = self.historic_predictions[pair].copy() + # ensure both dataframes have the same date format so they can be merged + new_pred["date_pred"] = pd.to_datetime(new_pred["date_pred"]) + hist_preds["date_pred"] = pd.to_datetime(hist_preds["date_pred"]) + # find the closest common date between new_pred and historic predictions # and cut off the new_pred dataframe at that date common_dates = pd.merge(new_pred, hist_preds, on="date_pred", how="inner") @@ -294,7 +298,9 @@ class FreqaiDataDrawer: "predictions. You likely left your FreqAI instance offline " f"for more than {len(dataframe.index)} candles.") - df_concat = pd.concat([hist_preds, new_pred], ignore_index=True, keys=hist_preds.keys()) + # reindex new_pred columns to match the historic predictions dataframe + new_pred_reindexed = new_pred.reindex(columns=hist_preds.columns) + df_concat = pd.concat([hist_preds, new_pred_reindexed], ignore_index=True) # any missing values will get zeroed out so users can see the exact # downtime in FreqUI diff --git a/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py b/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py index f43585ab0..1949ad536 100644 --- a/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py +++ b/freqtrade/freqai/prediction_models/XGBoostRFRegressor.py @@ -45,7 +45,7 @@ class XGBoostRFRegressor(BaseRegressionModel): model = XGBRFRegressor(**self.model_training_parameters) - model.set_params(callbacks=[TBCallback(dk.data_path)], activate=self.activate_tensorboard) + model.set_params(callbacks=[TBCallback(dk.data_path)]) model.fit(X=X, y=y, sample_weight=sample_weight, eval_set=eval_set, sample_weight_eval_set=eval_weights, xgb_model=xgb_model) # set the callbacks to empty so that we can serialize to disk later diff --git a/freqtrade/freqai/prediction_models/XGBoostRegressor.py b/freqtrade/freqai/prediction_models/XGBoostRegressor.py index f8b4d353d..f1a2474da 100644 --- a/freqtrade/freqai/prediction_models/XGBoostRegressor.py +++ b/freqtrade/freqai/prediction_models/XGBoostRegressor.py @@ -45,7 +45,7 @@ class XGBoostRegressor(BaseRegressionModel): model = XGBRegressor(**self.model_training_parameters) - model.set_params(callbacks=[TBCallback(dk.data_path)], activate=self.activate_tensorboard) + model.set_params(callbacks=[TBCallback(dk.data_path)]) model.fit(X=X, y=y, sample_weight=sample_weight, eval_set=eval_set, sample_weight_eval_set=eval_weights, xgb_model=xgb_model) # set the callbacks to empty so that we can serialize to disk later diff --git a/requirements-dev.txt b/requirements-dev.txt index d81e46f29..2302a0426 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -20,7 +20,7 @@ isort==5.12.0 time-machine==2.13.0 # Convert jupyter notebooks to markdown documents -nbconvert==7.11.0 +nbconvert==7.12.0 # mypy types types-cachetools==5.3.0.7 diff --git a/requirements.txt b/requirements.txt index 8e40eeec8..5ef69111d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ technical==1.4.0 tabulate==0.9.0 pycoingecko==3.1.0 jinja2==3.1.2 -tables==3.9.2 +tables==3.9.1 joblib==1.3.2 rich==13.7.0 pyarrow==14.0.1; platform_machine != 'armv7l' diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index e932fa9bb..1d26b706f 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -24,7 +24,7 @@ from tests.conftest import (EXMS, generate_test_data_raw, get_mock_coro, get_pat # Make sure to always keep one exchange here which is NOT subclassed!! -EXCHANGES = ['bittrex', 'binance', 'kraken', 'gate', 'kucoin', 'bybit', 'okx'] +EXCHANGES = ['binance', 'kraken', 'gate', 'kucoin', 'bybit', 'okx'] get_entry_rate_data = [ ('other', 20, 19, 10, 0.0, 20), # Full ask side @@ -3901,11 +3901,11 @@ def test_set_margin_mode(mocker, default_conf, margin_mode): ("kraken", TradingMode.SPOT, None, False), ("kraken", TradingMode.MARGIN, MarginMode.ISOLATED, True), ("kraken", TradingMode.FUTURES, MarginMode.ISOLATED, True), - ("bittrex", TradingMode.SPOT, None, False), - ("bittrex", TradingMode.MARGIN, MarginMode.CROSS, True), - ("bittrex", TradingMode.MARGIN, MarginMode.ISOLATED, True), - ("bittrex", TradingMode.FUTURES, MarginMode.CROSS, True), - ("bittrex", TradingMode.FUTURES, MarginMode.ISOLATED, True), + ("bitmart", TradingMode.SPOT, None, False), + ("bitmart", TradingMode.MARGIN, MarginMode.CROSS, True), + ("bitmart", TradingMode.MARGIN, MarginMode.ISOLATED, True), + ("bitmart", TradingMode.FUTURES, MarginMode.CROSS, True), + ("bitmart", TradingMode.FUTURES, MarginMode.ISOLATED, True), ("gate", TradingMode.MARGIN, MarginMode.ISOLATED, True), ("okx", TradingMode.SPOT, None, False), ("okx", TradingMode.MARGIN, MarginMode.CROSS, True), diff --git a/tests/exchange_online/conftest.py b/tests/exchange_online/conftest.py index 35c9a9d85..875faeded 100644 --- a/tests/exchange_online/conftest.py +++ b/tests/exchange_online/conftest.py @@ -14,14 +14,6 @@ EXCHANGE_FIXTURE_TYPE = Tuple[Exchange, str] # Exchanges that should be tested online EXCHANGES = { - 'bittrex': { - 'pair': 'BTC/USDT', - 'stake_currency': 'USDT', - 'hasQuoteVolume': False, - 'timeframe': '1h', - 'leverage_tiers_public': False, - 'leverage_in_spot_market': False, - }, 'binance': { 'pair': 'BTC/USDT', 'stake_currency': 'USDT', diff --git a/tests/freqai/test_freqai_datakitchen.py b/tests/freqai/test_freqai_datakitchen.py index 8d09cfc58..cac9d9838 100644 --- a/tests/freqai/test_freqai_datakitchen.py +++ b/tests/freqai/test_freqai_datakitchen.py @@ -10,9 +10,8 @@ from freqtrade.data.dataprovider import DataProvider from freqtrade.exceptions import OperationalException from freqtrade.freqai.data_kitchen import FreqaiDataKitchen from tests.conftest import get_patched_exchange -from tests.freqai.conftest import (get_patched_data_kitchen, get_patched_freqai_strategy, +from tests.freqai.conftest import (get_patched_data_kitchen, get_patched_freqai_strategy, is_mac, make_unfiltered_dataframe) -from tests.freqai.test_freqai_interface import is_mac @pytest.mark.parametrize( diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index b07951c0e..5d190dcc6 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -109,7 +109,6 @@ def get_telegram_testobject(mocker, default_conf, mock=True, ftbot=None): _start_thread=MagicMock(), ) if not ftbot: - mocker.patch('freqtrade.exchange.exchange.Exchange._init_async_loop') ftbot = get_patched_freqtradebot(mocker, default_conf) rpc = RPC(ftbot) telegram = Telegram(rpc, default_conf)