Ignore symbol-not-found errors

broker_bumpz
Tyler Goodlet 2022-04-08 14:59:53 -04:00
parent 7586e20ab4
commit 8b1c521ae9
1 changed files with 11 additions and 8 deletions

View File

@ -448,6 +448,7 @@ class Client:
symbol=sym,
exchange=exch,
)
try:
possibles = await self.ib.qualifyContractsAsync(con)
for i, condict in enumerate(sorted(
map(asdict, possibles),
@ -456,6 +457,8 @@ class Client:
)):
expiry = condict['lastTradeDateOrContractMonth']
results[f'{sym}.{exch}.{expiry}'] = condict
except RequestError as err:
log.warning(err.message)
return results