From 17a12c5849e351ff30bbafd43e4d802ea8fd1c25 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Thu, 16 Sep 2021 03:51:40 -0600 Subject: [PATCH] Revert "Removed backtesting funding-fee code" This reverts commit a8657bb1ce5181ab304b3d7ea0b00a08afae67de. --- freqtrade/exchange/exchange.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index ea020895e..602b656e0 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1637,22 +1637,6 @@ class Exchange: except ccxt.BaseError as e: raise OperationalException(e) from e - def fill_leverage_brackets(self): - """ - # TODO-lev: Should maybe be renamed, leverage_brackets might not be accurate for kraken - Assigns property _leverage_brackets to a dictionary of information about the leverage - allowed on each pair - """ - return - - def get_max_leverage(self, pair: Optional[str], nominal_value: Optional[float]) -> float: - """ - Returns the maximum leverage that a pair can be traded at - :param pair: The base/quote currency pair being traded - :nominal_value: The total value of the trade in quote currency (collateral + debt) - """ - return 1.0 - def _get_premium_index(self, pair: str, date: datetime) -> float: raise OperationalException(f'_get_premium_index has not been implemented on {self.name}') @@ -1684,6 +1668,22 @@ class Exchange: """ raise OperationalException(f"Funding fee has not been implemented for {self.name}") + def fill_leverage_brackets(self): + """ + # TODO-lev: Should maybe be renamed, leverage_brackets might not be accurate for kraken + Assigns property _leverage_brackets to a dictionary of information about the leverage + allowed on each pair + """ + return + + def get_max_leverage(self, pair: Optional[str], nominal_value: Optional[float]) -> float: + """ + Returns the maximum leverage that a pair can be traded at + :param pair: The base/quote currency pair being traded + :nominal_value: The total value of the trade in quote currency (collateral + debt) + """ + return 1.0 + @retrier def _set_leverage( self,