fix: sync live TP/SL to position cards after entrust changes
Use exchange TP/SL for display and DB sync on price_snapshot polls, refresh instance UI cells on each tick, and merge live values into hub monitor board. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1269,6 +1269,15 @@ def _merge_flask_order_price_fields(hub_mon: dict | None, snap: dict | None) ->
|
||||
o["rr_ratio"] = op["rr_ratio"]
|
||||
if "sl_breakeven_secured" in op:
|
||||
o["sl_breakeven_secured"] = bool(op["sl_breakeven_secured"])
|
||||
for key in (
|
||||
"stop_loss",
|
||||
"take_profit",
|
||||
"stop_loss_display",
|
||||
"take_profit_display",
|
||||
"display_rr_ratio",
|
||||
):
|
||||
if key in op and op[key] not in (None, ""):
|
||||
o[key] = op[key]
|
||||
|
||||
|
||||
def _merge_flask_position_breakeven(agent_row: dict, snap: dict | None, hub_mon: dict | None) -> None:
|
||||
|
||||
Reference in New Issue
Block a user