Fix wrong key, use account value

fsp_feeds
Tyler Goodlet 2021-09-13 08:21:42 -04:00
parent eb70baf161
commit c6cc592f4e
1 changed files with 6 additions and 1 deletions

View File

@ -429,9 +429,14 @@ async def open_brokerd_trades_dialogue(
# by receiving order submission response messages,
# normalizing them to EMS messages and relaying back to
# the piker order client set.
# locally cache and track positions per account.
pps = {}
for msg in positions:
pps.setdefault(msg['symbol'], {})['account'] = msg
pps.setdefault(
msg['symbol'],
{}
)[msg['account']] = msg
relay = TradesRelay(
brokerd_dialogue=brokerd_trades_stream,