ib.api: always key `._contracts` with '.ib' suffix
So that pos msgs from the ems are correctly loaded..ib_py311_fixes
parent
1002ce1e10
commit
461764419d
|
@ -727,12 +727,16 @@ class Client:
|
||||||
or tract.exchange
|
or tract.exchange
|
||||||
or exch
|
or exch
|
||||||
)
|
)
|
||||||
pattern: str = f'{symbol}.{exch}'
|
pattern: str = f'{symbol}.{exch.lower()}'
|
||||||
expiry: str = tract.lastTradeDateOrContractMonth
|
expiry: str = tract.lastTradeDateOrContractMonth
|
||||||
# add an entry with expiry suffix if available
|
# add an entry with expiry suffix if available
|
||||||
if expiry:
|
if expiry:
|
||||||
pattern += f'.{expiry}'
|
pattern += f'.{expiry}'
|
||||||
|
|
||||||
|
# since pos update msgs will always have the full fqme
|
||||||
|
# with suffix?
|
||||||
|
pattern += '.ib'
|
||||||
|
|
||||||
# directly cache the input pattern to the output
|
# directly cache the input pattern to the output
|
||||||
# contract match as well as by the IB-internal conId.
|
# contract match as well as by the IB-internal conId.
|
||||||
self._contracts[pattern] = tract
|
self._contracts[pattern] = tract
|
||||||
|
|
Loading…
Reference in New Issue