fix: include created_at in price_snapshot key monitor query

Avoid IndexError when rendering false breakout gate preview after the gate UI change.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-11 08:26:15 +08:00
parent fa59fc1273
commit 324aa1c5c6
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -6411,7 +6411,7 @@ def api_account_snapshot():
def api_price_snapshot():
conn = get_db()
key_rows = conn.execute(
"SELECT id,symbol,monitor_type,direction,upper,lower,fib_entry_price,fib_limit_order_id FROM key_monitors"
"SELECT id,symbol,monitor_type,direction,upper,lower,fib_entry_price,fib_limit_order_id,created_at FROM key_monitors"
).fetchall()
order_rows = conn.execute(
"SELECT id,symbol,exchange_symbol,direction,trigger_price,stop_loss,initial_stop_loss,take_profit,margin_capital,leverage FROM order_monitors WHERE status='active'"
@@ -6478,7 +6478,7 @@ def api_price_snapshot():
prev = false_breakout_gate_preview(
entry_display=entry_txt,
limit_order_id=_sqlite_row_val(r, "fib_limit_order_id"),
created_at=r["created_at"],
created_at=_sqlite_row_val(r, "created_at"),
now=app_now(),
)
gate_summary = prev.get("summary") or "-"