Just warn log on mismatched `MktPair` in paper eng

distribute_dis
Tyler Goodlet 2024-01-10 17:52:50 -05:00
parent 52b349fe79
commit 7c96c9fafe
1 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,7 @@ from contextlib import asynccontextmanager as acm
from datetime import datetime from datetime import datetime
from operator import itemgetter from operator import itemgetter
import itertools import itertools
from pprint import pformat
import time import time
from typing import ( from typing import (
Callable, Callable,
@ -697,7 +698,12 @@ async def open_trade_dialog(
# sanity check all the mkt infos # sanity check all the mkt infos
for fqme, flume in feed.flumes.items(): for fqme, flume in feed.flumes.items():
mkt: MktPair = symcache.mktmaps.get(fqme) or mkt_by_fqme[fqme] mkt: MktPair = symcache.mktmaps.get(fqme) or mkt_by_fqme[fqme]
assert mkt == flume.mkt if mkt != flume.mkt:
diff: tuple = mkt - flume.mkt
log.warning(
'MktPair sig mismatch?\n'
f'{pformat(diff)}'
)
get_cost: Callable = getattr( get_cost: Callable = getattr(
brokermod, brokermod,