@@ -660,11 +660,15 @@ def log_message(message: str) -> None:
660660 execution_blocked = bool (blocking_skips )
661661 funding_blocked = is_terminal_funding_block (blocking_skips )
662662 terminal_funding_block = funding_blocked and not execution_result .action_done
663- strategy_run_stage = resolve_strategy_run_stage (
664- dry_run_only = settings .dry_run_only ,
665- execution_blocked = execution_blocked ,
666- terminal_funding_block = terminal_funding_block ,
667- action_done = execution_result .action_done ,
663+ strategy_run_stage = (
664+ "PENDING_RECONCILIATION"
665+ if execution_result .pending_reconciliation
666+ else resolve_strategy_run_stage (
667+ dry_run_only = settings .dry_run_only ,
668+ execution_blocked = execution_blocked ,
669+ terminal_funding_block = terminal_funding_block ,
670+ action_done = execution_result .action_done ,
671+ )
668672 )
669673 signal_snapshot = build_signal_snapshot (
670674 platform = "firstrade" ,
@@ -698,6 +702,13 @@ def log_message(message: str) -> None:
698702 "skipped_orders" : skipped_orders ,
699703 "execution_notes" : execution_notes ,
700704 "action_done" : execution_result .action_done ,
705+ "broker_submission_done" : execution_result .broker_submission_done ,
706+ "execution_status" : (
707+ "pending_reconciliation" if execution_result .pending_reconciliation else ""
708+ ),
709+ "orders_pending_count" : (
710+ len (submitted_orders ) if execution_result .pending_reconciliation else 0
711+ ),
701712 }
702713 if execution_blocked :
703714 result ["execution_blocked" ] = True
@@ -737,6 +748,9 @@ def log_message(message: str) -> None:
737748 skipped_orders = list (execution_result .skipped_orders ),
738749 execution_notes = list (execution_result .execution_notes ),
739750 action_done = execution_result .action_done ,
751+ broker_submission_done = execution_result .broker_submission_done ,
752+ execution_status = result ["execution_status" ],
753+ orders_pending_count = result ["orders_pending_count" ],
740754 now = now ,
741755 )
742756 try :
@@ -772,6 +786,9 @@ def log_message(message: str) -> None:
772786 {
773787 "platform" : "firstrade" ,
774788 "action_done" : result .get ("action_done" ),
789+ "broker_submission_done" : result .get ("broker_submission_done" ),
790+ "execution_status" : result .get ("execution_status" ),
791+ "orders_pending_count" : result .get ("orders_pending_count" ),
775792 "strategy_run_stage" : result .get ("strategy_run_stage" ),
776793 "dry_run_only" : settings .dry_run_only ,
777794 "submitted_orders" : result .get ("submitted_orders" ),
0 commit comments