Append pp values per account during startup on ib

fsp_feeds
Tyler Goodlet 2021-09-10 11:36:46 -04:00
parent 71afce69d0
commit d25aec53e3
1 changed files with 5 additions and 3 deletions

View File

@ -740,7 +740,7 @@ async def load_aio_clients(
)
order = ports['order']
accounts_def = config.load_accounts('ib')
accounts_def = config.load_accounts(['ib'])
try_ports = [ports[key] for key in order]
ports = try_ports if port is None else [port]
@ -1459,7 +1459,7 @@ async def trades_dialogue(
# XXX: required to propagate ``tractor`` loglevel to piker logging
get_console_log(loglevel or tractor.current_actor().loglevel)
accounts_def = config.load_accounts('ib')
accounts_def = config.load_accounts(['ib'])
global _accounts2clients
global _client_cache
@ -1480,7 +1480,9 @@ async def trades_dialogue(
for client in _client_cache.values():
for pos in client.positions():
msg = pack_position(pos)
all_positions[msg.symbol] = msg.dict()
all_positions.setdefault(
msg.symbol, []
).append(msg.dict())
await ctx.started(all_positions)