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
831 stars 628 forks source link

String "RAW_REQUESTS": value not one of declared Enum instance names: [REQUEST_WEIGHT, ORDERS] #387

Closed gu1llermo closed 3 years ago

gu1llermo commented 3 years ago

Hello today when i try to do ExchangeInfo info = client.getExchangeInfo ();

I got the following error message

Exception in thread "main" com.binance.api.client.exception.BinanceApiException: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type com.binance.api.client.domain.general.RateLimitType from String "RAW_REQUESTS": value not one of declared Enum instance names: [REQUEST_WEIGHT, ORDERS] at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 311] (through reference chain: com.binance.api.client.domain.general.ExchangeInfo["rateLimits"]->java.util.ArrayList[3]->com.binance.api.client.domain.general.RateLimit["rateLimitType"])

cs-manar commented 3 years ago

Same here!!!!

Serg-Maximchuk commented 3 years ago

Hi all, I have fixed last crash with missing enum value and published my fork to the maven central, latest version is 1.0.4

gu1llermo commented 3 years ago

Thanks, what I did was add the value "RAW_REQUESTS" in the ENUM instance com.binance.api.client.domain.general.ExchangeInfo ["rateLimits"] and then Clean and Rebuild, and that's it. Thanks anyway

joaopsilva commented 3 years ago

This is fixed in the latest version, just update your repository with git pull.

cs-manar commented 3 years ago

Thanks all. It is fixed!