Normalize fullwidth punctuation to ASCII across codebase.
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""期权持仓监控:浮盈翻倍微信提醒。"""
|
||||
"""期权持仓监控:浮盈翻倍微信提醒."""
|
||||
from __future__ import annotations
|
||||
|
||||
import sqlite3
|
||||
@@ -29,11 +29,11 @@ def build_profit_alert_message(
|
||||
return "\n".join(
|
||||
[
|
||||
"【OKX期权·翻倍提醒】",
|
||||
f"账户:{account_label}",
|
||||
f"合约:{inst_id}",
|
||||
f"已付权利金:{premium_paid:.4f} USDC",
|
||||
f"未实现盈亏:{upl:+.4f} USDC({pct})",
|
||||
f"当前买一:{bid_txt}(可考虑限价平仓锁利)",
|
||||
f"账户:{account_label}",
|
||||
f"合约:{inst_id}",
|
||||
f"已付权利金:{premium_paid:.4f} USDC",
|
||||
f"未实现盈亏:{upl:+.4f} USDC({pct})",
|
||||
f"当前买一:{bid_txt}(可考虑限价平仓锁利)",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -48,8 +48,8 @@ def run_options_profit_alerts(
|
||||
ticker_bid_fn: Callable[[str], float | None],
|
||||
) -> int:
|
||||
"""
|
||||
对比 DB 中 open 记录与交易所持仓;达到阈值发微信。
|
||||
返回发送条数。
|
||||
对比 DB 中 open 记录与交易所持仓;达到阈值发微信.
|
||||
返回发送条数.
|
||||
"""
|
||||
sent = 0
|
||||
pos_by_inst = {str(p.get("inst_id") or p.get("instId") or ""): p for p in positions}
|
||||
|
||||
Reference in New Issue
Block a user