Revert "Removed backtesting funding-fee code"
This reverts commit a8657bb1ce
.
This commit is contained in:
parent
69eb898564
commit
17a12c5849
@ -1637,22 +1637,6 @@ class Exchange:
|
|||||||
except ccxt.BaseError as e:
|
except ccxt.BaseError as e:
|
||||||
raise OperationalException(e) from 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:
|
def _get_premium_index(self, pair: str, date: datetime) -> float:
|
||||||
raise OperationalException(f'_get_premium_index has not been implemented on {self.name}')
|
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}")
|
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
|
@retrier
|
||||||
def _set_leverage(
|
def _set_leverage(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user