knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
http://knowm.org/open-source/xchange/
MIT License
3.81k stars 1.93k forks source link

getAccountInfo() on CexIO PollingAccountService returns null when balance > 0 #1203

Closed mjagemann closed 6 years ago

mjagemann commented 8 years ago

Hi All,

I experience an issue with CexIO AccountService. When the wallet at CexIO is empty code runs without any issues, but as soon as balance is greater 0, following exception is thrown.

AccountInfo accountInfo = accountServiceCexIo.getAccountInfo(); -->

java.lang.NullPointerException at java.math.BigDecimal.add(BigDecimal.java:1288) at com.xeiam.xchange.cexio.CexIOAdapters.adaptWallet(CexIOAdapters.java:212) at com.xeiam.xchange.cexio.CexIOAdapters.adaptAccountInfo(CexIOAdapters.java:128) at com.xeiam.xchange.cexio.service.polling.CexIOAccountService.getAccountInfo(CexIOAccountService.java:31)

Do I eventually miss something like init *like with the issue on btce I reported) or do we really have an issue here? Anyone else experiences this issue? Help is apprecitaed

Best Regards, Marcel

timmolter commented 8 years ago

What version are you using? I suspect not 4.0.0-SNAPSHOT because if I look at line 212, I don't see any BigDecimal code.. I would suggest trying that. See README.

dimecoin commented 8 years ago

I documented the issue in detail here : https://github.com/timmolter/XChange/issues/1175#issuecomment-185842884