Merge branch 'develop' into feat/short
This commit is contained in:
@@ -50,7 +50,7 @@ class PriceFilter(IPairList):
|
||||
"""
|
||||
active_price_filters = []
|
||||
if self._low_price_ratio != 0:
|
||||
active_price_filters.append(f"below {self._low_price_ratio * 100}%")
|
||||
active_price_filters.append(f"below {self._low_price_ratio:.1%}")
|
||||
if self._min_price != 0:
|
||||
active_price_filters.append(f"below {self._min_price:.8f}")
|
||||
if self._max_price != 0:
|
||||
@@ -82,7 +82,7 @@ class PriceFilter(IPairList):
|
||||
changeperc = compare / ticker['last']
|
||||
if changeperc > self._low_price_ratio:
|
||||
self.log_once(f"Removed {pair} from whitelist, "
|
||||
f"because 1 unit is {changeperc * 100:.3f}%", logger.info)
|
||||
f"because 1 unit is {changeperc:.3%}", logger.info)
|
||||
return False
|
||||
|
||||
# Perform low_amount check
|
||||
|
@@ -34,7 +34,7 @@ class SpreadFilter(IPairList):
|
||||
Short whitelist method description - used for startup-messages
|
||||
"""
|
||||
return (f"{self.name} - Filtering pairs with ask/bid diff above "
|
||||
f"{self._max_spread_ratio * 100}%.")
|
||||
f"{self._max_spread_ratio:.2%}.")
|
||||
|
||||
def _validate_pair(self, pair: str, ticker: Dict[str, Any]) -> bool:
|
||||
"""
|
||||
@@ -47,7 +47,7 @@ class SpreadFilter(IPairList):
|
||||
spread = 1 - ticker['bid'] / ticker['ask']
|
||||
if spread > self._max_spread_ratio:
|
||||
self.log_once(f"Removed {pair} from whitelist, because spread "
|
||||
f"{spread * 100:.3f}% > {self._max_spread_ratio * 100}%",
|
||||
f"{spread * 100:.3%} > {self._max_spread_ratio:.3%}",
|
||||
logger.info)
|
||||
return False
|
||||
else:
|
||||
|
Reference in New Issue
Block a user