mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
cut the list to top x
This commit is contained in:
parent
70cc2942d7
commit
2eb3b73a93
|
@ -108,12 +108,22 @@ class MarketCapFilter(IPairList):
|
|||
per_page='250', page='1', sparkline='false',
|
||||
locale='en')
|
||||
if data:
|
||||
pairs_data = []
|
||||
marketcap_list = []
|
||||
for row in data:
|
||||
pairs_data.append(row['symbol'])
|
||||
marketcap_list.append(row['symbol'])
|
||||
|
||||
if len(marketcap_list) > 0:
|
||||
self._marketcap_cache['marketcap'] = marketcap_list
|
||||
can_filter = True
|
||||
|
||||
|
||||
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:
|
||||
|
||||
if len(pairs_data) > 0:
|
||||
logger.info(pairs_data)
|
||||
self._marketcap_cache['marketcap'] = pairs_data
|
||||
|
||||
return pairlist
|
||||
|
|
Loading…
Reference in New Issue
Block a user