force change branch name
parent
1651e89a06
commit
87f8163492
|
@ -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
|
# save pps in local state
|
||||||
_positions.update(table.pps)
|
_positions.update(table.pps)
|
||||||
|
|
||||||
pp_msgs: list[BrokerdPosition] = []
|
pp_msgs: list[BrokerdPosition] = []
|
||||||
pos: Position
|
pos: Position
|
||||||
token: str # f'{symbol}.{self.broker}'
|
token: str # f'{symbol}.{self.broker}'
|
||||||
|
log.warning(f'local _positions: {_positions}')
|
||||||
for token, pos in _positions.items():
|
for token, pos in _positions.items():
|
||||||
pp_msgs.append(BrokerdPosition(
|
pp_msgs.append(BrokerdPosition(
|
||||||
broker=broker,
|
broker=broker,
|
||||||
|
@ -573,7 +574,7 @@ async def trades_dialogue(
|
||||||
size=pos.size,
|
size=pos.size,
|
||||||
avg_price=pos.ppu,
|
avg_price=pos.ppu,
|
||||||
))
|
))
|
||||||
|
log.warning(f'pp_msgs: {pp_msgs}')
|
||||||
# TODO: load paper positions per broker from .toml config file
|
# TODO: load paper positions per broker from .toml config file
|
||||||
# and pass as symbol to position data mapping: ``dict[str, dict]``
|
# and pass as symbol to position data mapping: ``dict[str, dict]``
|
||||||
await ctx.started((
|
await ctx.started((
|
||||||
|
|
Loading…
Reference in New Issue