add market check

This commit is contained in:
Stefano Ariestasia
2024-01-08 15:33:43 +09:00
parent d578c910bc
commit 442ca86d15

View File

@@ -174,8 +174,10 @@ class MarketCapFilter(IPairList):
f"within top {self._limit} market cap")
else:
market = self._config['trading_mode']
pair_format = f"{self._stake_currency.upper()}" if (market == 'spot') else f"{self._stake_currency.upper()}:{self._stake_currency.upper()}"
for mc_pair in marketcap_list:
test_pair = f"{mc_pair.upper()}/{self._stake_currency.upper()}"
test_pair = f"{mc_pair.upper()}/{pair_format}"
if test_pair in pairlist:
filtered_pairlist.append(test_pair)
if len(filtered_pairlist) == self._limit: