Add option close liquidity gate with 30% bid/mark cap.
Block new opens while flat legs wait; emergency close bypasses the check. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,6 +37,8 @@ async def sim_open_group(
|
||||
_user: Annotated[str, Depends(require_user)],
|
||||
body: ManualOpenBody | None = None,
|
||||
) -> dict:
|
||||
if Matcher().has_open_position():
|
||||
raise HTTPException(status_code=409, detail="有未平仓,禁止开下一组")
|
||||
gw = get_gateway()
|
||||
pick = await gw.pick_for_open_async()
|
||||
if pick is None:
|
||||
|
||||
Reference in New Issue
Block a user