Fixed time format for schedule and update_funding_fees conf is mocked better

This commit is contained in:
Sam Germain
2021-10-05 01:42:46 -06:00
parent 6e1e1e00c2
commit 29e582c6d9
2 changed files with 13 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ Freqtrade is the main module of this bot. It contains the class Freqtrade()
import copy
import logging
import traceback
from datetime import datetime, timezone
from datetime import datetime, time, timezone
from math import isclose
from threading import Lock
from typing import Any, Dict, List, Optional
@@ -112,7 +112,7 @@ class FreqtradeBot(LoggingMixin):
if self.trading_mode == TradingMode.FUTURES:
for time_slot in self.exchange.funding_fee_times:
schedule.every().day.at(time_slot).do(self.update_funding_fees())
schedule.every().day.at(str(time(time_slot))).do(self.update_funding_fees)
self.wallets.update()
def notify_status(self, msg: str) -> None:
@@ -195,6 +195,9 @@ 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: