Skip to content

fix(orderbook): raise opening taker orders to the market minimum notional - #352

Merged
jackhai9 merged 1 commit into
mainfrom
fix/open-taker-min-notional
Nov 11, 2026
Merged

jackhai9 merged 1 commit into
mainfrom
fix/open-taker-min-notional

Conversation

@jackhai9

Copy link
Copy Markdown
Owner

Problem

Live (JCTUSDT, 2x leverage, open short, taker 20%): the ladder sized orders at about 5 USDT using ask-side maker prices. The market order trades at the bid, its notional fell below the 5 USDT MIN_NOTIONAL, and Binance's page refused it locally without a request (下单请求仍未返回). At 3x leverage (larger sizes) the same ladder succeeded. Closing (reduce-only) market orders are exempt.

Change (2.7.250)

  • OPEN mode: a taker slot is raised, never lowered, so quantity × min(best bid, best ask) covers 101% of MIN_NOTIONAL, in MARKET_LOT_SIZE steps; the console logs planned and sent quantities. Example: 884 JCT at bid 0.005651 → 894 JCT.
  • CLOSE mode is unchanged.
  • Missing market rules keep 市价单数量规则未就绪; an unknown minimum notional or a raised quantity that breaks MARKET_LOT_SIZE places the slot Post Only with the reason on the final status.
  • The page's reference price for its own check is unobserved (documented); a still-refused order returns its budget and stops visibly, never retried.

Validation

  • Regression e2e reproduces the live condition (0.07 × 81.03 ≥ 5.67 > 0.07 × 80.9) and fails without the fix (mutation check); new scenarios: open long unchanged, unknown minimum notional and above-max fall back to Post Only, close keeps its size; unit tests for the helper.
  • npm test 2685 passed; npm run test:ui 697 passed; lint:tests, lint:ui-copy, check:binance-userscripts, check:binance-orderbook-trade, git diff --check pass.
  • Independent read-only review: ship with fixes; findings addressed.
  • Not yet re-tested live at 2x leverage.

🤖 Generated with Claude Code

…onal

The ladder sizes each order at a maker price, which for a short sits above
the market. On a 2x JCTUSDT open short with taker 20%, orders were about
5 USDT at the ask-side maker price; the market order trades at the bid, fell
below Binance's 5 USDT minimum notional, and the page refused it without a
request ("下单请求仍未返回").

In OPEN mode a taker slot is now raised, never lowered, so that quantity x
min(best bid, best ask) covers 101% of MIN_NOTIONAL in MARKET_LOT_SIZE steps;
the console logs the planned and sent quantities. Reduce-only closing orders
have no minimum notional and keep their size. A slot whose notional cannot be
checked, or whose raised quantity breaks MARKET_LOT_SIZE, is placed Post Only
with the reason on the final status; missing market rules keep the
rules-not-ready reason. Which reference price the page's own check uses has
not been observed; a refused raised order still returns its budget and stops
visibly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jackhai9
jackhai9 merged commit 9045ff9 into main Nov 11, 2026
2 checks passed
@jackhai9
jackhai9 deleted the fix/open-taker-min-notional branch November 11, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant