Include LIVE close-fee estimate in target PnL; rest after manual and emergency close.

Align docs so LIVE exit matches SIM fee buffer; manual full close now enters rest_seconds like auto/emergency.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 22:58:10 +08:00
parent 16efa44ffb
commit 9d3b36826c
7 changed files with 51 additions and 7 deletions
+5
View File
@@ -133,9 +133,14 @@ async def sim_close_group(_user: Annotated[str, Depends(require_user)]) -> dict:
status_code=403,
detail="未开启「显示手动开仓」;请在策略设置中开启后再用",
)
from ..strategy import get_engine
r = get_executor().close_group(reason="manual")
if not r.ok and not r.liquidity_wait:
raise HTTPException(status_code=400, detail=r.detail)
if r.ok:
# 与自动/紧急全平一致:成功全平后进入组间休息
get_engine().enter_rest_after_close()
return {
"ok": r.ok,
"liquidity_wait": r.liquidity_wait,