Fix OKX abandon residual double-book and fill/residual ledger holes.

After dual-close leaves option pending, continue close_group instead of false residual; reject partial fills on wait timeout; LIVE residual settle allow_negative.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-29 20:20:36 +08:00
parent ec87cf2104
commit 44fd0371b9
7 changed files with 71 additions and 44 deletions
+2 -1
View File
@@ -115,7 +115,8 @@ class BinanceLiveExecutor(Matcher):
except Exception as e:
logger.exception("binance live open option failed")
msg = str(e)
if "orderId=" in msg or "orderId" in msg.lower():
# 仅当错误带明确 orderId= 时保留 opening(避免校验文案误卡槽)
if "orderId=" in msg:
return OpenResult(
ok=False,
detail=f"币安开期权未确认成交(保留 opening 防重复开,请核对交易所): {e}",