Skip to content

Backpack - #96

Merged
marcinvalas merged 7 commits into
masterfrom
backpack
Nov 17, 2026
Merged

marcinvalas merged 7 commits into
masterfrom
backpack

Conversation

@marcinvalas

Copy link
Copy Markdown
Contributor

No description provided.

@thaaddeus

Copy link
Copy Markdown
Member

Before merge:

  1. symbols: [] returns no derivative tickers or liquidations. The docs say an empty or omitted symbols array means all symbols, and the other Backpack normalizers work that way. BackpackDerivativeTickerMapper.getFilters and BackpackLiquidationsMapper.getFilters (src/mappers/backpack.ts:155-165, :203-209) filter [] for _PERP symbols, get [] again and then return no channels. So replayNormalized({ exchange: 'backpack', symbols: [], ... }, normalizeDerivativeTickers, normalizeLiquidations) yields nothing. One recorded minute gave 5,153 derivative tickers with symbols omitted and 0 with symbols: []. Master's test empty and omitted symbols request the same channels for every exchange and normalizer fails on exactly this after a rebase (backpack: [] vs ['markPrice', 'openInterest', 'ticker']). The fix below uses the same isNullOrEmptyArray check as the WhiteBIT mapper, and with it all 306 tests pass:

    getFilters(symbols?: string[]) {
      if (!isNullOrEmptyArray(symbols)) {
        symbols = symbols!.filter((symbol) => symbol.endsWith('_PERP'))
        if (symbols.length === 0) {
          return []
        }
      }
      ...
    }

Other than that ready to merge and release (minor version bump).

@marcinvalas
marcinvalas merged commit a95a9b3 into master Nov 17, 2026
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

Development

Successfully merging this pull request may close these issues.

2 participants