Always ensure symcache mkt pair entry is valid type

ib_py311_fixes
Tyler Goodlet 2023-09-19 15:56:47 -04:00
parent 30d55fdb27
commit 05959eaf70
1 changed files with 5 additions and 0 deletions

View File

@ -543,6 +543,11 @@ class Account(Struct):
if not (pos := pps.get(bs_mktid)):
assert isinstance(
mkt,
MktPair,
)
# if no existing pos, allocate fresh one.
pos = pps[bs_mktid] = Position(
mkt=mkt,