Don't bother ensuring all symbols in data

kivy_mainline_and_py3.8
Tyler Goodlet 2019-02-10 19:09:54 -05:00
parent 57bef52438
commit 3a6efd451d
1 changed files with 1 additions and 2 deletions

View File

@ -338,9 +338,8 @@ class Client:
to_lookup = list(set(tickers) - set(symbols2ids)) to_lookup = list(set(tickers) - set(symbols2ids))
if to_lookup: if to_lookup:
data = await self.api.symbols(names=','.join(to_lookup)) data = await self.api.symbols(names=','.join(to_lookup))
for ticker, symbol in zip(to_lookup, data['symbols']): for symbol in data['symbols']:
name = symbol['symbol'] name = symbol['symbol']
assert name == ticker
cache[name] = symbols2ids[name] = str(symbol['symbolId']) cache[name] = symbols2ids[name] = str(symbol['symbolId'])
return symbols2ids return symbols2ids