顺势加仓 v2:程序监控滚仓、文档页与平仓同步
重写滚仓计仓与四种加仓方式(市价/斐波/突破),程序盯 mark 触价成交;风险读监控单;pending 可删不可改;手动平仓同步结束滚仓。新增 /strategy/roll/docs 说明页与顺势加仓滚仓说明.md。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2143,6 +2143,15 @@ async def api_close_position(exchange_id: str, body: ClosePositionBody):
|
||||
)
|
||||
if isinstance(sync_parsed, dict):
|
||||
out["trend_sync"] = sync_parsed
|
||||
roll_sync = await _fetch_flask_json(
|
||||
flask_client,
|
||||
ex,
|
||||
"/api/hub/roll/sync-flat",
|
||||
method="POST",
|
||||
json_body={"symbol": sym, "side": side},
|
||||
)
|
||||
if isinstance(roll_sync, dict):
|
||||
out["roll_sync"] = roll_sync
|
||||
risk_sync = await _notify_instance_user_close(flask_client, ex, count=1)
|
||||
if isinstance(risk_sync, dict):
|
||||
out["risk_sync"] = risk_sync
|
||||
|
||||
Reference in New Issue
Block a user