Repository navigation
feat(orderbook): send a selectable share of each ladder round as market orders - #351
Merged
Merged
Conversation
…et orders The ladder title row gains taker chips (关/20%/50%/80%), stored per mode, symbol and precision like the other ladder options and off by default. Each round first sends its taker share as native MARKET orders using the nearest levels' quantities, then reprices the remaining levels and places them Post Only. A one-round ladder takes max(1, floor(orders x ratio)); a continuous close carries the remainder across rounds, never exceeding ceil(orders x ratio) per round and carrying at most one owed order. Market orders never retry an unknown outcome. The budget unit is spent before the click and returned only when no request left the page or one settled 2xx JSON response rejected it with a definite code (90802022 then enters the existing reduce-only recovery). Otherwise the account stream must report the client order ID within 5 s, or the session stops. The fetch hook checks the native body before it leaves the page: a taker must be exactly the planned MARKET order and a maker must not be MARKET; mismatches are blocked and briefly refused on retry. The form always returns to Post Only before errors propagate, and a new dialog after the click stops without confirming it. The title tooltip summarizes taker fills for the latest task in four lines. Live evidence: a user-authorized 1-JCT market close-long on 2026-11-11. Also stabilizes two replacement tests that asserted a transient status and an asynchronously serialized console argument. 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.
Summary
Orderbook 2.7.249 adds ladder taker orders. The ladder title row reads
阶梯下单 · 吃单followed by关 / 20% / 50% / 80%, stored per mode + symbol + precision and off by default (off = unchanged behavior).max(1, floor(orders × ratio)). Continuous close: remainder carries across rounds, at mostceil(orders × ratio)per round and at most one owed order.Safety
success:falsewith a definite code (-1000/-1006/-1007/-1008excluded).90802022enters the existing reduce-only recovery and the slot is retried once after replacement.吃单结果未确认,已停止).MARKETorder (symbol, side, positionSide, quantity, client ID); a ladder maker must not beMARKET. Mismatches are blocked and refused again for 60 s.Stats
The
吃单title tooltip shows four lines for the latest task: order count, fills above/below the previous fill, and favorable/unfavorable/flat/no-data/pending counts 5 s and 30 s after each fill. Per-order detail is logged with[TAKER].Evidence and validation
{symbol,type:"MARKET",side:"SELL",positionSide:"LONG",quantity:1,newClientOrderId,placeType}; responsesuccess:true,status:"NEW",avgPrice:"0",reduceOnly:true; stream NEW then TRADE/FILLED; no confirmation dialog.npm test2684 passed;npm run test:ui692 passed;lint:tests,lint:ui-copy,check:binance-userscripts,check:binance-orderbook-trade,git diff --checkpass.🤖 Generated with Claude Code