replace single quote docstrings with double quote docstrings

This commit is contained in:
Sam Germain
2022-01-14 05:49:46 -06:00
parent 7abffee755
commit 0c8205ab3b
5 changed files with 54 additions and 51 deletions

View File

@@ -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]

View File

@@ -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