Added TODOs to test files

This commit is contained in:
Sam Germain
2021-08-08 23:13:35 -06:00
parent add7e74632
commit 455bcf5389
7 changed files with 36 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ class Binance(Exchange):
Returns True if adjustment is necessary.
:param side: "buy" or "sell"
"""
# TODO-mg: Short support
# TODO-lev: Short support
return order['type'] == 'stop_loss_limit' and stop_loss > float(order['info']['stopPrice'])
@retrier(retries=0)
@@ -43,7 +43,7 @@ class Binance(Exchange):
It may work with a limited number of other exchanges, but this has not been tested yet.
:param side: "buy" or "sell"
"""
# TODO-mg: Short support
# TODO-lev: Short support
# Limit price threshold: As limit price should always be below stop-price
limit_price_pct = order_types.get('stoploss_on_exchange_limit_ratio', 0.99)
rate = stop_price * limit_price_pct

View File

@@ -543,7 +543,7 @@ class Exchange:
def get_min_pair_stake_amount(self, pair: str, price: float, stoploss: float,
leverage: Optional[float] = 1.0) -> Optional[float]:
# TODO-mg: Using leverage makes the min stake amount lower (on binance at least)
# TODO-lev: Using leverage makes the min stake amount lower (on binance at least)
try:
market = self.markets[pair]
except KeyError:
@@ -1550,7 +1550,7 @@ class Exchange:
until=until, from_id=from_id))
def get_interest_rate(self, pair: str, open_rate: float, is_short: bool) -> float:
# TODO-mg: implement
# TODO-lev: implement
return 0.0005
def set_leverage(self, pair, leverage):

View File

@@ -36,7 +36,7 @@ class Ftx(Exchange):
Verify stop_loss against stoploss-order value (limit or price)
Returns True if adjustment is necessary.
"""
# TODO-mg: Short support
# TODO-lev: Short support
return order['type'] == 'stop' and stop_loss > float(order['price'])
@retrier(retries=0)
@@ -48,7 +48,7 @@ class Ftx(Exchange):
Limit orders are defined by having orderPrice set, otherwise a market order is used.
"""
# TODO-mg: Short support
# TODO-lev: Short support
limit_price_pct = order_types.get('stoploss_on_exchange_limit_ratio', 0.99)
limit_rate = stop_price * limit_price_pct

View File

@@ -72,7 +72,7 @@ class Kraken(Exchange):
Verify stop_loss against stoploss-order value (limit or price)
Returns True if adjustment is necessary.
"""
# TODO-mg: Short support
# TODO-lev: Short support
return (order['type'] in ('stop-loss', 'stop-loss-limit')
and stop_loss > float(order['price']))
@@ -83,7 +83,7 @@ class Kraken(Exchange):
Creates a stoploss market order.
Stoploss market orders is the only stoploss type supported by kraken.
"""
# TODO-mg: Short support
# TODO-lev: Short support
params = self._params.copy()
if order_types.get('stoploss', 'market') == 'limit':