From 1408ba80aa04cbde2d7d7436903b3c0f9acc949e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 4 Apr 2023 14:10:12 -0400 Subject: [PATCH] paper: always sync pps.toml state on startup --- piker/clearing/_paper_engine.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/piker/clearing/_paper_engine.py b/piker/clearing/_paper_engine.py index 85956551..3c6fdc4c 100644 --- a/piker/clearing/_paper_engine.py +++ b/piker/clearing/_paper_engine.py @@ -473,6 +473,7 @@ async def handle_order_requests( BrokerdOrderAck( oid=order.oid, reqid=reqid, + account='paper' ) ) @@ -564,6 +565,10 @@ async def trades_dialogue( ['paper'], )) + # write new positions state in case ledger was + # newer then that tracked in pps.toml + ppt.write_config() + # exit early since no fqme was passed, # normally this case is just to load # positions "offline".