Ignore symbol-not-found errors
parent
7586e20ab4
commit
8b1c521ae9
|
@ -448,14 +448,17 @@ class Client:
|
||||||
symbol=sym,
|
symbol=sym,
|
||||||
exchange=exch,
|
exchange=exch,
|
||||||
)
|
)
|
||||||
possibles = await self.ib.qualifyContractsAsync(con)
|
try:
|
||||||
for i, condict in enumerate(sorted(
|
possibles = await self.ib.qualifyContractsAsync(con)
|
||||||
map(asdict, possibles),
|
for i, condict in enumerate(sorted(
|
||||||
# sort by expiry
|
map(asdict, possibles),
|
||||||
key=lambda con: con['lastTradeDateOrContractMonth'],
|
# sort by expiry
|
||||||
)):
|
key=lambda con: con['lastTradeDateOrContractMonth'],
|
||||||
expiry = condict['lastTradeDateOrContractMonth']
|
)):
|
||||||
results[f'{sym}.{exch}.{expiry}'] = condict
|
expiry = condict['lastTradeDateOrContractMonth']
|
||||||
|
results[f'{sym}.{exch}.{expiry}'] = condict
|
||||||
|
except RequestError as err:
|
||||||
|
log.warning(err.message)
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue