From 86cbd0039ff9ff270009e6517005b70c0c0812fb Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Tue, 12 Oct 2021 02:24:35 -0600 Subject: [PATCH] Fixed bugs --- freqtrade/freqtradebot.py | 3 --- tests/test_freqtradebot.py | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index b937810f1..88b26115e 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -204,9 +204,6 @@ class FreqtradeBot(LoggingMixin): if self.get_free_open_trades(): self.enter_positions() - if self.trading_mode == TradingMode.FUTURES: - schedule.run_pending() - Trade.commit() def process_stopped(self) -> None: diff --git a/tests/test_freqtradebot.py b/tests/test_freqtradebot.py index 82150a704..3cd489685 100644 --- a/tests/test_freqtradebot.py +++ b/tests/test_freqtradebot.py @@ -9,7 +9,6 @@ from unittest.mock import ANY, MagicMock, PropertyMock import arrow import pytest -import schedule from freqtrade.constants import CANCEL_REASON, MATH_CLOSE_PREC, UNLIMITED_STAKE_AMOUNT from freqtrade.enums import RPCMessageType, RunMode, SellType, State, TradingMode @@ -4288,8 +4287,8 @@ def test_get_valid_price(mocker, default_conf_usdt) -> None: (TradingMode.FUTURES, 32, "2021-09-01 00:00:01", "2021-09-01 08:00:01"), (TradingMode.FUTURES, 33, "2021-09-01 00:00:01", "2021-09-01 08:00:02"), (TradingMode.FUTURES, 33, "2021-09-01 00:00:00", "2021-09-01 08:00:02"), - (TradingMode.FUTURES, 34, "2021-08-31 23:59:59", "2021-09-01 08:00:02"), - (TradingMode.FUTURES, 34, "2021-08-31 23:59:59", "2021-09-01 08:00:03"), + (TradingMode.FUTURES, 33, "2021-08-31 23:59:59", "2021-09-01 08:00:02"), + (TradingMode.FUTURES, 33, "2021-08-31 23:59:59", "2021-09-01 08:00:03"), ]) def test_update_funding_fees(mocker, default_conf, trading_mode, calls, time_machine, t1, t2):