removed interest method from exchange, will create a separate interest PR

This commit is contained in:
Sam Germain
2021-09-09 13:42:35 -06:00
parent 93da13212c
commit 9f96b977f6
2 changed files with 0 additions and 88 deletions

View File

@@ -1581,31 +1581,6 @@ class Exchange:
self._async_get_trade_history(pair=pair, since=since,
until=until, from_id=from_id))
@retrier
def get_interest_rate(
self,
pair: str,
maker_or_taker: str,
is_short: bool
) -> Tuple[float, float]:
"""
Gets the rate of interest for borrowed currency when margin trading
:param pair: base/quote currency pair
:param maker_or_taker: "maker" if limit order, "taker" if market order
:param is_short: True if requesting base interest, False if requesting quote interest
:return: (open_interest, rollover_interest)
"""
try:
# TODO-lev: implement, currently there is no ccxt method for this
return (0.0005, 0.0005)
except ccxt.DDoSProtection as e:
raise DDosProtection(e) from e
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
raise TemporaryError(
f'Could not set leverage due to {e.__class__.__name__}. Message: {e}') from e
except ccxt.BaseError as e:
raise OperationalException(e) from e
@retrier
def fill_leverage_brackets(self):
"""