feat: archive trades by close time and show open time on live positions
Sort inner-archive daily trades by closed_at_ms; add open time and live hold duration to instance and hub position cards, with exchange margin on hub footer. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7172,6 +7172,9 @@ def api_price_snapshot():
|
||||
symbol=r["symbol"],
|
||||
)
|
||||
apply_time_close_to_payload(payload, r)
|
||||
payload["opened_at"] = r["opened_at"] if "opened_at" in r.keys() else None
|
||||
open_ms = r["opened_at_ms"] if "opened_at_ms" in r.keys() else None
|
||||
payload["opened_at_ms"] = int(open_ms) if open_ms not in (None, "") else None
|
||||
new_sl, new_tp, changed = order_monitor_tpsl_needs_sync(
|
||||
r["stop_loss"], r["take_profit"], exchange_tpsl
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user