binance-exchange / binance-java-api

binance-java-api is a lightweight Java library for the Binance API, supporting synchronous and asynchronous requests, as well as event streaming using WebSockets.
MIT License
830 stars 622 forks source link

Binance API suddenly stops working #415

Open JamesDee13 opened 2 years ago

JamesDee13 commented 2 years ago

Hi all, I'm using BinanceAPIWebSocketClient for streaming candlestick data and it is working just fine. But since couple of hours ago, it is suddently not working anymore as it won't print new candlestick data and I can't received any news data, it's just totally blank and keep going to next sessions of code and taking very long time like 10mins to run to the end of the code without any errors, the console won't found any errors at all, it is just stopped working. Anyone knows what's happening ? ps: I tried client.ping() but it did not give any responses, just blank console and taking about 5 mins to run in console without any errors. Binance server or Binance java API false ?

luckuny commented 2 years ago

client.onAggTradeEvent(symbol.toLowerCase(), new BinanceApiCallback() { @Override public void onResponse(final AggTradeEvent response) { System.out.println(response); }

@Override
public void onFailure(final Throwable cause) {          // **it will fine your bug**
    System.err.println("Web socket failed");
    cause.printStackTrace(System.err);
}

});

JamesDee13 commented 2 years ago

I would check on your suggestion. thanks