fix(backpack): normalize ticker percentage with Precise.stringMul - #29192
Merged
kroitor merged 10 commits intoJul 11, 2026
Conversation
Backpack reports priceChangePercent as a fractional value. Scale it to the unified percentage and update the response fixtures. Signed-off-by: Functionhx <2994114386@qq.com>
…invalidPercentage post-processing The invalidPercentage override was discarding safeTicker's valid percentage computation when priceChangePercent is non-numeric but open and change are both available. Precise.stringMul matches the codebase convention used by kucoin, bybit, and okx. Signed-off-by: Functionhx <2994114386@qq.com>
Functionhx
requested review from
carlosmiei,
frosty00 and
kroitor
as code owners
July 11, 2026 16:07
Handle non-numeric priceChangePercent in backpack.ts
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.
Fixes #29190.
Backpack's API returns priceChangePercent as a raw fraction, but CCXT's unified ticker expects percent. The parseTicker function now uses Precise.stringMul to convert it, matching the convention used by kucoin, bybit, and okx.
The previous implementation also had an invalidPercentage post-processing block that discarded safeTicker's valid auto-computation from open/change when the raw value was non-numeric — that's been removed so "N/A" and similar non-numeric values fall through correctly.