Skip ib exchanges we haven't tested yet
parent
42fda2a9e6
commit
6f3b799960
|
@ -164,6 +164,14 @@ _adhoc_futes_set = {
|
||||||
'mes.globex',
|
'mes.globex',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# exchanges we don't support at the moment due to not knowing
|
||||||
|
# how to do symbol-contract lookup correctly likely due
|
||||||
|
# to not having the data feeds subscribed.
|
||||||
|
_exch_skip_list = {
|
||||||
|
'ASX', # aussie stocks
|
||||||
|
'MEXI', # mexican stocks
|
||||||
|
}
|
||||||
|
|
||||||
# https://misc.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Conid%20Info&wlId=IB&conid=69067924
|
# https://misc.interactivebrokers.com/cstools/contract_info/v3.10/index.php?action=Conid%20Info&wlId=IB&conid=69067924
|
||||||
|
|
||||||
_enters = 0
|
_enters = 0
|
||||||
|
@ -266,9 +274,11 @@ class Client:
|
||||||
descriptions = await self.ib.reqMatchingSymbolsAsync(pattern)
|
descriptions = await self.ib.reqMatchingSymbolsAsync(pattern)
|
||||||
|
|
||||||
if descriptions is not None:
|
if descriptions is not None:
|
||||||
|
|
||||||
futs = []
|
futs = []
|
||||||
for d in descriptions:
|
for d in descriptions:
|
||||||
con = d.contract
|
con = d.contract
|
||||||
|
if con.primaryExchange not in _exch_skip_list:
|
||||||
futs.append(self.ib.reqContractDetailsAsync(con))
|
futs.append(self.ib.reqContractDetailsAsync(con))
|
||||||
|
|
||||||
# batch request all details
|
# batch request all details
|
||||||
|
@ -1273,7 +1283,7 @@ async def open_symbol_search(
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not pattern:
|
if not pattern:
|
||||||
log.warning(f'empty pattern received, skipping..')
|
log.warning('empty pattern received, skipping..')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
log.debug(f'searching for {pattern}')
|
log.debug(f'searching for {pattern}')
|
||||||
|
|
Loading…
Reference in New Issue