From 986c6fe17a066628ab38708504ec9dddddf21965 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 30 Jul 2021 23:18:27 -0600 Subject: [PATCH] swapped maintenancemarginformula for liqformula --- freqtrade/exchange/ftx.py | 2 +- freqtrade/freqtradebot.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/exchange/ftx.py b/freqtrade/exchange/ftx.py index 41a466650..4f7f19579 100644 --- a/freqtrade/exchange/ftx.py +++ b/freqtrade/exchange/ftx.py @@ -5,7 +5,7 @@ from typing import Any, Dict import ccxt from freqtrade.enums import LiqFormula -#from freqtrade.enums import InterestMode, LiqFormula +# from freqtrade.enums import InterestMode from freqtrade.exceptions import (DDosProtection, InsufficientFundsError, InvalidOrderException, OperationalException, TemporaryError) from freqtrade.exchange import Exchange diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index ee4673aa2..56d51ac82 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -107,7 +107,8 @@ class FreqtradeBot(LoggingMixin): # Start calculating maintenance margin if on cross margin # TODO: Add margin_mode to freqtrade.configuration? - if self.config.get('margin_mode') == "cross": + if self.config.get('leverage_type') == "cross" or \ + self.config.get('leverage_type') == "cross_futures": self.maintenance_margin = MaintenanceMargin(self.exchange.liq_formula) self.maintenance_margin.run