Set `.bs_mktid` on all IB position-msg emissions..

brokers_refinery
Tyler Goodlet 2025-09-26 17:44:06 -04:00
parent 6d6afbde8f
commit 44f58657c3
1 changed files with 6 additions and 1 deletions

View File

@ -357,6 +357,10 @@ async def update_and_audit_pos_msg(
size=ibpos.position,
avg_price=pikerpos.ppu,
# XXX ensures matching even if multiple venue-names
# in `.bs_fqme`, likely from txn records..
bs_mktid=mkt.bs_mktid,
)
ibfmtmsg: str = pformat(ibpos._asdict())
@ -425,7 +429,8 @@ async def aggr_open_orders(
) -> None:
'''
Collect all open orders from client and fill in `order_msgs: list`.
Collect all open orders from client and fill in `order_msgs:
list`.
'''
trades: list[Trade] = client.ib.openTrades()