force change branch name

explicit_write_pps_on_exit
algorandpa 2023-02-09 16:26:22 -05:00 committed by jaredgoldman
parent 84cd1e0059
commit 68a196218b
1 changed files with 4 additions and 3 deletions

View File

@ -557,14 +557,15 @@ async def trades_dialogue(
):
with open_pps(broker, 'paper-id') as table:
with open_pps(broker, 'piker-paper') as table:
log.warning(f'pp table: {table}')
# save pps in local state
_positions.update(table.pps)
pp_msgs: list[BrokerdPosition] = []
pos: Position
token: str # f'{symbol}.{self.broker}'
log.warning(f'local _positions: {_positions}')
for token, pos in _positions.items():
pp_msgs.append(BrokerdPosition(
broker=broker,
@ -573,7 +574,7 @@ async def trades_dialogue(
size=pos.size,
avg_price=pos.ppu,
))
log.warning(f'pp_msgs: {pp_msgs}')
# TODO: load paper positions per broker from .toml config file
# and pass as symbol to position data mapping: ``dict[str, dict]``
await ctx.started((