Repository navigation
feat(v3.6.13): Expiry reason updatesEXHAUSTED, eV, BUY lock release, fix rounding, keepPriority, docs - #700
Merged
Conversation
- Add Spot expiry reasons, effective STP modes, quote notional limits, shutdown times and subscription filter types. - Document BUY limit order balance-lock releases from 20 November 2026. - Floor tick and step sizes with decimal-safe arithmetic, preserving aligned values (fixes sieblyio#695) - Route keep-priority order amendments to the Spot endpoint (fixes sieblyio#696) - Use depth stream names and the default Spot interval in legacy subscriptions (fixes sieblyio#697) - Correct deprecated broker paths and require referral identifiers (fixes sieblyio#698) - Update the Node.js version pin to v24.22.3.
…deprecated helpers unchanged - roundToTickSize/roundToStepSize floor via scaled integer math (no BigInt, no deps); handles non-power-of-ten and already-aligned increments (Fixes sieblyio#695) - Revert legacy subscribeDiffBookDepth changes to upstream (sieblyio#697 skipped) - Revert deprecated broker helper changes to upstream (sieblyio#698 skipped)
| // Round to the nearest step | ||
| const stepSizeNum = parseFloat(stepSize); | ||
| const rounded = Math.floor(quantity / stepSizeNum) * stepSizeNum; | ||
| export function roundToTickSize(price: number, tickSize: string): number { |
Member
There was a problem hiding this comment.
I think it's worth adding unit tests on these, to ensure we're running extra checks on any issues we discover on these methods. Especially when it comes to dealing with floating precision...
| /** | ||
| * Rounds a quantity down to a multiple of the symbol's step size | ||
| */ | ||
| export function roundToStepSize(quantity: number, stepSize: string): number { |
Member
There was a problem hiding this comment.
This too, as above. Some tests on the common cases we're checking incl any previously reported issues we're fixing with this change.
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
Spot types for the Binance Spot changes live 20 Nov 2026 07:00 UTC (changelog 2026-11-11), plus fixes for #695 and #696.
Changelog
expiryReasontyped asSpotExpiryReason, incl. newEXHAUSTEDandINSUFFICIENT_QUOTE_NOTIONAL_LIMITeffectiveSelfTradePreventionMode(raweV) on user data events and FULLpreventedMatches[]quoteNotionalLimiton spot orders and order lists (BUY only, no enable date yet),QqonexecutionReport,market/limitQuoteNotionalLimitAllowedon exchangeInfoT(shutdownTime) onserverShutdown, optionalfilteron WS APIuserDataStream.subscriberoundToTickSize/roundToStepSizefloor with decimal-safe integer math (no BigInt), incl. non-power-of-ten and aligned values (Fixes Rounding helpers mishandle non-power-of-ten increments and aligned decimal values #695)amendOrderKeepPrioritycallsPUT /api/v3/order/amend/keepPriority(Fixes MainClient.amendOrderKeepPriority uses Futures path for a Spot operation #696).nvmrctov24.22.3Checks
tsc --noEmit, build: passexamples/apidocandllms.txtregenerated with the regex runner