filter the pairlist

This commit is contained in:
Stefano Ariestasia
2024-01-07 23:30:11 +09:00
parent 2eb3b73a93
commit 1cd08c96a1

View File

@@ -120,10 +120,14 @@ class MarketCapFilter(IPairList):
if can_filter:
filtered_pairlist = []
top_marketcap = marketcap_list[:self._max_rank:]
logger.info(top_marketcap)
logger.info(len(top_marketcap))
# for pair in pairlist:
for pair in pairlist:
base = pair.split('/')[0]
if base.lower() in top_marketcap:
filtered_pairlist.append(pair)
if len(filtered_pairlist) > 0:
return filtered_pairlist
return pairlist