Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binance withdrawal exception on succesful service call #4190

Open
aligokalppeker opened this issue Jul 23, 2021 · 1 comment
Open

Binance withdrawal exception on succesful service call #4190

aligokalppeker opened this issue Jul 23, 2021 · 1 comment

Comments

@aligokalppeker
Copy link
Contributor

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).

@pvyhnal-generalbytes
Copy link
Contributor

pvyhnal-generalbytes commented Oct 8, 2021

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&timestamp=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 f9e8ae2 where checkApiResponse is used only in withdrawal call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants