补齐币本位期权开平仓微信推送:单位用ETH/BTC,手动/目标/翻倍平仓与翻倍提醒均必达。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -233,6 +233,9 @@ def _notify_profit_exit_close(
|
||||
result: dict[str, Any],
|
||||
conn: Any = None,
|
||||
) -> None:
|
||||
from lib.options.options_notify_lib import resolve_premium_ccy
|
||||
|
||||
ccy = resolve_premium_ccy(inst_id=inst_id)
|
||||
if result.get("fully_closed") or result.get("already_flat"):
|
||||
if cfg is not None:
|
||||
try:
|
||||
@@ -246,6 +249,7 @@ def _notify_profit_exit_close(
|
||||
sheets=result.get("submitted_sheets"),
|
||||
premium_received=result.get("premium_received"),
|
||||
close_quote=result.get("locked_bid_px") or result.get("bid"),
|
||||
premium_ccy=ccy,
|
||||
)
|
||||
return
|
||||
except Exception:
|
||||
@@ -260,8 +264,8 @@ def _notify_profit_exit_close(
|
||||
f"账户:{account_label}",
|
||||
f"合约:{inst_id}",
|
||||
f"倍数:{mult:g}(1倍=盈利=权利金)",
|
||||
f"权利金:{premium_paid if premium_paid is not None else '—'}",
|
||||
f"可回收:{recycle if recycle is not None else '—'}",
|
||||
f"权利金:{premium_paid if premium_paid is not None else '—'} {ccy}",
|
||||
f"可回收:{recycle if recycle is not None else '—'} {ccy}",
|
||||
f"提交张数:{result.get('submitted_sheets') or '—'}",
|
||||
f"状态:{'已全平' if (result.get('fully_closed') or result.get('already_flat')) else '挂单中/部分'}",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user