Skip to content

feat(v3.6.13): Expiry reason updatesEXHAUSTED, eV, BUY lock release, fix rounding, keepPriority, docs - #700

Merged
tiagosiebler merged 5 commits into
sieblyio:masterfrom
JJ-Cro:update16112026
Nov 20, 2026
Merged

tiagosiebler merged 5 commits into
sieblyio:masterfrom
JJ-Cro:update16112026

Conversation

@JJ-Cro

@JJ-Cro JJ-Cro commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

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

  • Spot expiryReason typed as SpotExpiryReason, incl. new EXHAUSTED and INSUFFICIENT_QUOTE_NOTIONAL_LIMIT
  • Optional effectiveSelfTradePreventionMode (raw eV) on user data events and FULL preventedMatches[]
  • JSDoc: from 20 Nov, BUY limit orders that trade on entry then rest release locks above remaining qty x price
  • Optional quoteNotionalLimit on spot orders and order lists (BUY only, no enable date yet), Qq on executionReport, market/limitQuoteNotionalLimitAllowed on exchangeInfo
  • Optional T (shutdownTime) on serverShutdown, optional filter on WS API userDataStream.subscribe
  • roundToTickSize / roundToStepSize floor 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)
  • amendOrderKeepPriority calls PUT /api/v3/order/amend/keepPriority (Fixes MainClient.amendOrderKeepPriority uses Futures path for a Spot operation #696)
  • .nvmrc to v24.22.3
  • Version 3.6.13

Checks

  • lint, tsc --noEmit, build: pass
  • Endpoint docs, examples/apidoc and llms.txt regenerated with the regex runner

JJ-Cro and others added 4 commits November 16, 2026 12:18
- 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)
Comment thread src/util/rounding.ts
// Round to the nearest step
const stepSizeNum = parseFloat(stepSize);
const rounded = Math.floor(quantity / stepSizeNum) * stepSizeNum;
export function roundToTickSize(price: number, tickSize: string): number {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Comment thread src/util/rounding.ts
/**
* Rounds a quantity down to a multiple of the symbol's step size
*/
export function roundToStepSize(quantity: number, stepSize: string): number {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too, as above. Some tests on the common cases we're checking incl any previously reported issues we're fixing with this change.

@tiagosiebler tiagosiebler changed the title feat(v3.6.13): Spot 20 Nov changes (EXHAUSTED, eV, BUY lock release), fix rounding, keepPriority feat(v3.6.13): Expiry reason updatesEXHAUSTED, eV, BUY lock release, fix rounding, keepPriority, docs Nov 19, 2026

@tiagosiebler tiagosiebler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, excellent

@tiagosiebler
tiagosiebler merged commit 828b672 into sieblyio:master Nov 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants