Just warn log on mismatched `MktPair` in paper eng
parent
52b349fe79
commit
7c96c9fafe
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue