Skip to content

fix(backpack): normalize ticker percentage with Precise.stringMul - #29192

Merged
kroitor merged 10 commits into
ccxt:masterfrom
Functionhx:fix/29190-backpack-ticker-percentage
Jul 11, 2026
Merged

fix(backpack): normalize ticker percentage with Precise.stringMul#29192
kroitor merged 10 commits into
ccxt:masterfrom
Functionhx:fix/29190-backpack-ticker-percentage

Conversation

@Functionhx

Copy link
Copy Markdown
Contributor

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.

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>
@kroitor kroitor self-assigned this Jul 11, 2026
@kroitor
kroitor merged commit dee14b1 into ccxt:master Jul 11, 2026
9 of 10 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

Development

Successfully merging this pull request may close these issues.

Backpack: fetchTicker/fetchTickers percentage field is 100x too small (Its missing the x100 conversion)

2 participants