replace single quote docstrings with double quote docstrings
This commit is contained in:
@@ -139,8 +139,11 @@ class Binance(Exchange):
|
||||
[amt, old_ratio] = [None, None]
|
||||
brackets = []
|
||||
for [notional_floor, mm_ratio] in brkts:
|
||||
amt = ((float(notional_floor) * (float(mm_ratio) - float(old_ratio))) +
|
||||
amt) if old_ratio else 0
|
||||
amt = (
|
||||
(
|
||||
(float(notional_floor) * (float(mm_ratio)) - float(old_ratio))
|
||||
) + amt
|
||||
) if old_ratio else 0
|
||||
old_ratio = mm_ratio
|
||||
brackets.append([
|
||||
float(notional_floor),
|
||||
@@ -234,14 +237,14 @@ class Binance(Exchange):
|
||||
pair: str,
|
||||
nominal_value: Optional[float] = 0.0,
|
||||
):
|
||||
'''
|
||||
"""
|
||||
Maintenance amt = Floor of Position Bracket on Level n *
|
||||
difference between
|
||||
Maintenance Margin Rate on Level n and
|
||||
Maintenance Margin Rate on Level n-1)
|
||||
+ Maintenance Amount on Level n-1
|
||||
https://www.binance.com/en/support/faq/b3c689c1f50a44cabb3a84e663b81d93
|
||||
'''
|
||||
"""
|
||||
if pair not in self._leverage_brackets:
|
||||
raise InvalidOrderException(f"Cannot calculate liquidation price for {pair}")
|
||||
pair_brackets = self._leverage_brackets[pair]
|
||||
|
@@ -1985,10 +1985,10 @@ class Exchange:
|
||||
|
||||
@retrier
|
||||
def get_liquidation_price(self, pair: str):
|
||||
'''
|
||||
Set's the margin mode on the exchange to cross or isolated for a specific pair
|
||||
:param pair: base/quote currency pair (e.g. "ADA/USDT")
|
||||
'''
|
||||
"""
|
||||
Set's the margin mode on the exchange to cross or isolated for a specific pair
|
||||
:param pair: base/quote currency pair (e.g. "ADA/USDT")
|
||||
"""
|
||||
if self._config['dry_run'] or not self.exchange_has("fetchPositions"):
|
||||
# Some exchanges only support one collateral type
|
||||
return
|
||||
@@ -2008,9 +2008,9 @@ class Exchange:
|
||||
pair: str,
|
||||
nominal_value: Optional[float] = 0.0,
|
||||
):
|
||||
'''
|
||||
:return: The maintenance amount, and maintenance margin rate
|
||||
'''
|
||||
"""
|
||||
:return: The maintenance amount, and maintenance margin rate
|
||||
"""
|
||||
# TODO-lev: return the real amounts
|
||||
return 0, 0.4
|
||||
|
||||
|
Reference in New Issue
Block a user