Align emergency option close to OKX: use bid only, never mark.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -367,7 +367,7 @@ class Matcher:
|
||||
"""
|
||||
全平一组。默认校验期权买一深度 + 买一/标记偏差(默认≤30%)。
|
||||
reason=expiry:对齐实盘,期权按标的结算价的内在价值入账(不吃盘口)。
|
||||
bypass_liquidity=True(紧急):绕过深度闸门,价取 max(买一, 标记, 内在价值)。
|
||||
bypass_liquidity=True(紧急):绕过深度/偏差闸门,成交价仍按买一(对齐 OKX 市价卖,不用标记)。
|
||||
成交顺序:先平期权 → 再瞬时平永续;永续盘口失败则回滚期权入账。
|
||||
"""
|
||||
s = get_settings()
|
||||
@@ -462,7 +462,7 @@ class Matcher:
|
||||
if resolved is None:
|
||||
return CloseResult(
|
||||
ok=False,
|
||||
detail="紧急全平失败:无买一/标记/内在价值",
|
||||
detail="紧急全平失败:无买一(对齐 OKX,不能用标记价平仓)",
|
||||
)
|
||||
close_bid = resolved
|
||||
of = option_fill(
|
||||
|
||||
Reference in New Issue
Block a user