updates suggested on github

This commit is contained in:
Sam Germain 2021-10-18 00:16:49 -06:00
parent ad2c88b991
commit e4682b78c5
2 changed files with 5 additions and 10 deletions

View File

@ -479,11 +479,7 @@ class FreqtradeBot(LoggingMixin):
bid_check_dom = self.config.get('bid_strategy', {}).get('check_depth_of_market', {})
if ((bid_check_dom.get('enabled', False)) and
(bid_check_dom.get('bids_to_ask_delta', 0) > 0)):
if self._check_depth_of_market(
pair,
bid_check_dom,
side=signal
):
if self._check_depth_of_market(pair, bid_check_dom, side=signal):
return self.execute_entry(
pair,
stake_amount,
@ -629,9 +625,10 @@ class FreqtradeBot(LoggingMixin):
if not stake_amount:
return False
log_type = f"{name} signal found"
logger.info(f"{log_type}: about create a new trade for {pair} with stake_amount: "
f"{stake_amount} ...")
logger.info(
f"{name} signal found: about create a new trade for {pair} with stake_amount: "
f"{stake_amount} ..."
)
amount = (stake_amount / enter_limit_requested) * leverage
order_type = self.strategy.order_types['buy']
@ -1280,7 +1277,6 @@ class FreqtradeBot(LoggingMixin):
:param trade: Trade instance
:param limit: limit rate for the sell order
:param sell_reason: Reason the sell was triggered
:param side: "buy" or "sell"
:return: True if it succeeds (supported) False (not supported)
"""
exit_type = 'sell' # TODO-lev: Update to exit

View File

@ -665,7 +665,6 @@ def test_PerformanceFilter_error(mocker, whitelist_conf, caplog) -> None:
@pytest.mark.usefixtures("init_persistence")
# TODO-lev: @pytest.mark.parametrize('is_short', [True, False])
def test_PerformanceFilter_lookback(mocker, whitelist_conf, fee, caplog) -> None:
whitelist_conf['exchange']['pair_whitelist'].append('XRP/BTC')
whitelist_conf['pairlists'] = [