Open aligokalppeker opened 3 years ago
Happens to us too
DEBUG si.mazi.rescu.HttpTemplate - Executing POST request at https://api.binance.com/sapi/v1/capital/withdraw/apply?signature=xxx body coin=XRP&address=rXXX&amount=21.609905&name=xxx×tamp=1633699394875
DEBUG si.mazi.rescu.HttpTemplate - Http call returned 200; response body:
{"id":"9c7662xxxxxxxxxc8bd"}
ERROR batm.master.exchange.Binance - Binance (https://api.binance.com/) exchange withdrawal failed
org.knowm.xchange.exceptions.ExchangeException: null (HTTP status code: 0)
at org.knowm.xchange.binance.BinanceErrorAdapter.adapt(BinanceErrorAdapter.java:49)
at org.knowm.xchange.binance.service.BinanceAccountService.withdrawFunds(BinanceAccountService.java:132)
Seems to be introduced in f9e8ae29802e80bb8a2f188b37ab790bf1d55a06 where checkApiResponse is used only in withdrawal call.
Hi,
I am testing Binance withdrawal API. It successfully withdraws XRP from the wallet and triggers the transfer. But service response code can not be parsed correctly(maybe it is changed/updated). So it throws an exception on parsing the response of the service :
Exception in thread "main" org.knowm.xchange.exceptions.ExchangeException: null (HTTP status code: 0) at org.knowm.xchange.binance.BinanceErrorAdapter.adapt(BinanceErrorAdapter.java:49) at org.knowm.xchange.binance.service.BinanceAccountService.withdrawFunds(BinanceAccountService.java:168) at org.knowm.xchange.binance.service.BinanceAccountService.withdrawFunds(BinanceAccountService.java:138) at com.xxx.yyy.MarketOperationsTest.testWithdraw(MarketOperationsTest.java:51) at com.xxx.yyy.MarketOperationsTest.main(MarketOperationsTest.java:34) Caused by: org.knowm.xchange.binance.dto.BinanceException: null (HTTP status code: 0) at org.knowm.xchange.binance.service.BinanceAccountServiceRaw.checkApiResponse(BinanceAccountServiceRaw.java:213) at org.knowm.xchange.binance.service.BinanceAccountServiceRaw.withdraw(BinanceAccountServiceRaw.java:70) at org.knowm.xchange.binance.service.BinanceAccountServiceRaw.withdraw(BinanceAccountServiceRaw.java:48) at org.knowm.xchange.binance.service.BinanceAccountService.withdrawFunds(BinanceAccountService.java:160) ... 3 more
I am testing this code on the dev branch(5.0.10-SNAPSHOT).