BCH/BTC : [EQuery:Unknown asset pair]
See original GitHub issueI have added a new currency BCH in KrakenUtils.java
DIGITAL_CURRENCIES.add(KrakenAdapters.adaptCurrency("BCH"));
When requesting a ticker
System.out.println(marketDataService.getTicker(new CurrencyPair(Currency.BCH, Currency.BTC))) ;
I am still getting ExchangeException
[main] INFO org.knowm.xchange.kraken.KrakenExchange - Calling Remote Init... Exception in thread "main" org.knowm.xchange.exceptions.ExchangeException: [EQuery:Unknown asset pair] at org.knowm.xchange.kraken.service.KrakenBaseService.checkResult(KrakenBaseService.java:82) at org.knowm.xchange.kraken.service.KrakenMarketDataServiceRaw.getKrakenTicker(KrakenMarketDataServiceRaw.java:38) at org.knowm.xchange.kraken.service.KrakenMarketDataService.getTicker(KrakenMarketDataService.java:31)
Why it is happening. I thought a pair may be created as soon a Currency is introduced. Isn’t it? Do you need to create a pair manually?
Give a hint what else must be edited to correct it?
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (11 by maintainers)
Top GitHub Comments
HI,
I beleive we need to have Kraken adapters not add in the X’s and Z’s into a pair when submitting the request where the quote currency is BCH.
Currently the latest develop branch is market data request by sending https://api.kraken.com/0/public/Trades?pair=ZBCHXXBT, as ZBCHXXBT is not a valid pair (https://api.kraken.com/0/public/AssetPairs) the valid pair is just BCHXBT.
Essentially when the quote currency is BCH the kraken adapter should not add the Z and X’s to create the pair.
Happy to fix it up later today, or if someone else is taking a look, great!
That does sound like a good change. (And I also don’t use dark markets).
I think we still need to consider a general solution to this problem though. Not all exchanges will have the necessary API calls to do it magically.