From 493e45e70aad31fba6cd327a86479c214fdf7f2b Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 24 Mar 2022 13:28:06 -0400 Subject: [PATCH] Strip broker name from symbol on pp msg updates --- piker/ui/order_mode.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 26f44007..6316f116 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -816,10 +816,18 @@ async def process_trades_and_update_ui( 'position', ): sym = mode.chart.linked.symbol - symbol = msg['symbol'].lower() + pp_msg_symbol = msg['symbol'].lower() 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.live_pp.update_from_msg(msg) # update order pane widgets