Very very incomplete implementation of Bittrex/and many other generic services
See original GitHub issueAs i look into the implementation of Bittrex generic services implementation, i see “BittrextAdapters” class has such an incomplete and erroneous code :
public static void adaptMetaData(List<BittrexSymbol> rawSymbols, ExchangeMetaData metaData) {
BittrexAdapters.adaptCurrencyPairs(rawSymbols).forEach(
currencyPair -> {
metaData.getCurrencyPairs().putIfAbsent(currencyPair, null);
metaData.getCurrencies().putIfAbsent(currencyPair.base, null);
metaData.getCurrencies().putIfAbsent(currencyPair.counter, null);
});
}
(This code belongs to @walec51 as git blame shows)
This code fills the pairs and currency only with their name and leaves other fields as null(or with default value with the lucky ones read from the static resource file). Any developer which aims to use generic interfaces gets incomplete/inconsistent currencies and/or currency pairs with null fields(wallet health, fees etc…).
Me and my colleague, as we traverse the code within the scope of generic exchange implementations, see many of these incomplete implementations. They are just seem to be implemented for “just putting some code on the method that returns something”
I am fixing this issue in a separate branch. But i want to open this issue, because such situations cause frustrations about the stability/functionality of the xchange and it is required moderate and avoid contribution of such “bad examples” to get more community interest/investment on the project.
NOTE: By the way, its interface and other design concepts of xchange is good. I appreciate the other qualities of the library( domain model-dto, adapters and API decorators)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
We are aware of the issue. And no - its not a life cycle issue.
What is your proposed solution?
Not to accept PRs if they do not implement every feature required by generic interface?
If so then you can remove 9 out of 10 modules from this repo and kill this project. No one ever provided a 100% complete implementation of a exchange in one PR and no one ever will. This is an on going effort - eventually we might get there for most big exchanges.
Every one which uses this library works only on the features they need. Every time I find some missing feature in the implementations of those generic interfaces I add it and submit a PR. If you stop accepting PRs with partial implementations then I and every one else will just stop submitting them to this project.
Then please update the “exchange support” page to reflect the true state of the project. Also we should remove or write a warning about the “generic examples” from the introductory “readme” page though generic interface are not implemented properly.
This project should not misguide people, neither intentionally or otherwise… @walec51