mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-17 20:04:19 +01:00
Use python set instead of list in list_tickers for better performance
This commit is contained in:
@@ -111,8 +111,9 @@ class TiingoClient(RestClient):
|
||||
if not len(assetTypes):
|
||||
return [row for row in reader]
|
||||
|
||||
t = set(assetTypes)
|
||||
return [row for row in reader
|
||||
if row.get('assetType') in assetTypes]
|
||||
if row.get('assetType') in t]
|
||||
|
||||
def list_stock_tickers(self):
|
||||
return self.list_tickers(['Stock'])
|
||||
|
||||
Reference in New Issue
Block a user