XChange: BCH/BTC : [EQuery:Unknown asset pair]
I 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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (9 by maintainers)
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!