Repository navigation
fix(orderbook): raise opening taker orders to the market minimum notional - #352
Merged
Merged
Conversation
…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>
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.
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)
quantity × min(best bid, best ask)covers 101% ofMIN_NOTIONAL, inMARKET_LOT_SIZEsteps; the console logs planned and sent quantities. Example: 884 JCT at bid 0.005651 → 894 JCT.市价单数量规则未就绪; an unknown minimum notional or a raised quantity that breaksMARKET_LOT_SIZEplaces the slot Post Only with the reason on the final status.Validation
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 test2685 passed;npm run test:ui697 passed;lint:tests,lint:ui-copy,check:binance-userscripts,check:binance-orderbook-trade,git diff --checkpass.🤖 Generated with Claude Code