only doing this if the category is set

This commit is contained in:
Jakub Werner (jakubikan) 2024-09-17 23:03:51 +02:00
parent 660623181a
commit 50f07e7b11

View File

@ -46,6 +46,7 @@ class MarketCapPairList(IPairList):
is_demo=_coingecko_config.get("is_demo", True),
)
if self._category:
categories = self._coingecko.get_coins_categories_list()
category_ids = [cat["category_id"] for cat in categories]
@ -173,7 +174,7 @@ class MarketCapPairList(IPairList):
for mc_pair in top_marketcap:
test_pair = f"{mc_pair.upper()}/{pair_format}"
if test_pair in pairlist and test_pair not in filtered_pairlist:
if test_pair in pairlist:
filtered_pairlist.append(test_pair)
if len(filtered_pairlist) == self._number_assets:
break