[binance] Spot getTickers() drops every symbol ending in "USD"

Open Beginner friendly
#5,411 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
api, backend

Research direction

Read BinanceTicker24h.isValid() and its use in BinanceMarketDataService.getTickers(), then inspect the Binance spot ticker tests or add a focused regression case if none covers this path. Check that getTickers() retains BTCUSD and FDUSD spot pairs while the intended COIN-M futures filtering still works.

Written by the indexing model from the issue text.

Description

Since ee99f4ab1 ("get all tickers futures fix", in 5.2.3)
BinanceTicker24h.isValid() is

return !(symbol.contains("_") || symbol.endsWith("USD"));

and BinanceMarketDataService.getTickers() applies it to spot tickers
too. The comment says it is meant to filter out COIN-M futures, but on
spot it removes every market whose quote currency ends in USD, for
example BTCUSD and all FDUSD pairs such as BTCFDUSD and ETHFDUSD.

Found in bisq-pricenode, which reads the Binance spot tickers with
getTickers(): with 5.2.2 it gets a BTC/USD rate, with 5.2.5 it does
not. getTicker(CurrencyPair.BTC_USD) is not affected, because the
single ticker path does not call isValid(). The code is the same in
6.0.0 and on develop.

Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
21

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from knowm/XChange

All issues in knowm/XChange

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.