Repository navigation
fix(orderbook): continue reduce-only close recovery when a selected order fills - #348
Merged
Merged
Conversation
…rder fills Near the tail of a continuous close, a reduce-only rejection (90802022) selects close orders to cancel, and one often fills before its click. The cancel loop required every selected order to be present and stopped the whole task otherwise; a live JCTUSDT close stopped at round 624/628 with "无法确认待替换订单". During reduce-only recovery only, a selected order that is absent from both the rendered rows and the native list's complete committed data now ends the batch without counting it as released quantity. The recovery runner waits, rereads the authoritative position and rebuilds: a fill continues the task, while an unchanged position followed by another rejection stops with the existing no-progress message. A committed but unrendered order, more than one match, and ordinary replacements still stop. Release: orderbook 2.7.246. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Near the tail of a continuous close, a Binance reduce-only rejection (
90802022) starts recovery, which selects same-direction close orders to cancel. A selected order often fills between selection and its click.cancelOpenOrderRowsForPlanrequired each selected order to match exactly one rendered row and otherwise ended the task. On 2026-11-10 a live JCTUSDT continuous close stopped at round 624/628 with无法确认待替换订单,已停止重新挂单 · 只减仓订单被拒绝 · 错误码 90802022.During reduce-only recovery (
confirmed_reduce_only_conflict) only:待替换挂单已成交或消失,重新核对持仓and the replacement returnstarget_left_list;runCloseLadderWithPositionRecoverythen waits, rereads the authoritative position and rebuilds. A fill continues the task. An unchanged position followed by another rejection stops with the existing "替换后仍有只减仓冲突,复核持仓未减少" guard.These cases still stop: a committed but unrendered order, more than one match, quantity mismatches, scope or dialog changes, and every ordinary replacement.
Release: orderbook 2.7.246.
Validation:
Not exercised live: real reduce-only rejections near the end of a close.
🤖 Generated with Claude Code