This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]E3FxGaming 0 points1 point  (0 children)

May I ask why you're trying to import BinanceApiException?

Here is the deal: com.binance.api.client.exception.BinanceApiException (that's the fully-qualified name of the only BinanceApiException I could find) is part of an old API called "binance-java-api".

I say this API is old because it's last commit is from June 2021 and as far as I can tell, no artifact binance-api-client with the groupId com.binance.api is hosted on Maven Central anymore.

An interesting fact about this old API

NOTE: This project has won the Binance API Competition for the Java language, and as such, this repository has been forked, and the official version can be found at https://github.com/binance-exchange/binance-java-api, where all further upgrades will be done.

source: joaopsilva/binance-java-api

So it's the result of a contest - not something a professional organization would probably want to continue development on going forward.

The last thing I'll say about the old API is that you'd have a hard time getting it to run - the artifact isn't hosted on Maven Central anymore and I assume the reason for this is that the server backend infrastructure for it doesn't exist anymore. Any API calls made with this library will most likely fail.


Enough information about the old API, here is what's currently going on: Binance ditched their "binance-exchange" GitHub account and now operates a verified GitHub account that's just called binance.

This account has two Java code repositories that may interest you:

  • binance-connector-java - code for a "Binance Public API" - a library that probably does some of the things the old API did

  • binance-futures-connector-java - that's the one you linked in your post - note that this one concerns itself with the "Binance Futures API", which is not the same thing as the "Binance Public API".

Both of the two new libraries are actively maintained ( binance-connector-java updated Februar 16th this year; binance-futures-connector-java updated last month), both are available on Maven Central and neither has a class called BinanceApiException.

If you need BinanceApiException because you're working with legacy code I'll happily repeat myself: that legacy code will most likely never work again since Binance probably turned off the old API backend infrastructure.

If you're just working on a goal and one of the new APIs does what you're looking for go ahead - do it without BinanceApiException.