Strip broker name from symbol on pp msg updates

mkts_backup
Tyler Goodlet 2022-03-24 13:28:06 -04:00
parent 0676f3271c
commit 0cb05ef868
1 changed files with 10 additions and 2 deletions

View File

@ -816,10 +816,18 @@ async def process_trades_and_update_ui(
'position', 'position',
): ):
sym = mode.chart.linked.symbol sym = mode.chart.linked.symbol
symbol = msg['symbol'].lower() pp_msg_symbol = msg['symbol'].lower()
fqsn = sym.front_fqsn() fqsn = sym.front_fqsn()
broker, key = sym.front_feed()
# print(
# f'pp msg symbol: {pp_msg_symbol}\n',
# f'fqsn: {fqsn}\n',
# f'front key: {key}\n',
# )
if symbol in fqsn: if (
pp_msg_symbol == fqsn.replace(f'.{broker}', '')
):
tracker = mode.trackers[msg['account']] tracker = mode.trackers[msg['account']]
tracker.live_pp.update_from_msg(msg) tracker.live_pp.update_from_msg(msg)
# update order pane widgets # update order pane widgets