Fix `.ib` pattern match
parent
b357a120b9
commit
26f47227d2
|
@ -520,7 +520,7 @@ class Client:
|
||||||
# XXX UPDATE: we can probably do the tick/trades scraping
|
# XXX UPDATE: we can probably do the tick/trades scraping
|
||||||
# inside our eventkit handler instead to bypass this entirely?
|
# inside our eventkit handler instead to bypass this entirely?
|
||||||
|
|
||||||
if 'ib' in pattern:
|
if '.ib' in pattern:
|
||||||
from ..data._source import unpack_fqsn
|
from ..data._source import unpack_fqsn
|
||||||
broker, symbol, expiry = unpack_fqsn(pattern)
|
broker, symbol, expiry = unpack_fqsn(pattern)
|
||||||
else:
|
else:
|
||||||
|
@ -536,11 +536,7 @@ class Client:
|
||||||
symbol, _, expiry = symbol.rpartition('.')
|
symbol, _, expiry = symbol.rpartition('.')
|
||||||
|
|
||||||
# use heuristics to figure out contract "type"
|
# use heuristics to figure out contract "type"
|
||||||
try:
|
sym, exch = symbol.upper().rsplit('.', maxsplit=1)
|
||||||
sym, exch = symbol.upper().rsplit('.', maxsplit=1)
|
|
||||||
except ValueError:
|
|
||||||
# likely there's an embedded `.` for a forex pair
|
|
||||||
breakpoint()
|
|
||||||
|
|
||||||
qualify: bool = True
|
qualify: bool = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue