修复期权开平仓时间按 UTC 入库导致复盘K线标记偏8小时:统一业务时区并一次性迁移。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -361,12 +361,15 @@ def close_option_by_bid1(
|
||||
ELSE signal_note
|
||||
END"""
|
||||
params.append(signal_note)
|
||||
from lib.options.options_time_lib import options_app_now_str
|
||||
|
||||
params.append(options_app_now_str())
|
||||
params.append(int(row["id"]))
|
||||
conn.execute(
|
||||
f"""
|
||||
UPDATE options_trades
|
||||
SET status = 'closed', close_quote = ?, premium_received = ?,
|
||||
realized_pnl = ?, close_ord_id = ?, closed_at = CURRENT_TIMESTAMP
|
||||
realized_pnl = ?, close_ord_id = ?, closed_at = ?
|
||||
{note_sql}
|
||||
WHERE id = ?
|
||||
""",
|
||||
|
||||
Reference in New Issue
Block a user