JKorf / Binance.Net

A C# .netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Binance.Net/
MIT License
1.04k stars 427 forks source link

Bug in GetExchangeInfoAsync due to Binance backend changes? #1321

Closed FandangoOnCore closed 10 months ago

FandangoOnCore commented 10 months ago

Describe the bug

Hi @JKorf, the last 4 days, every time I'm calling the function BinanceSocketClient.SpotApi.ExchangeData.GetExchangeInfoAsync() I get the following JSON deserialization exception:

"Deserialize JsonSerializationException: Error setting value to 'Type' on 'Binance.Net.Objects.Models.BinanceRateLimit'. "

IMHO the problem is Binance sending a new kind of rateLimitType ("CONNECTIONS") that cannot be mapped into a member of the enumerated type RateLimitType (as the only members are, at the moment, REQUESTED_WEIGHT, ORDERS and RAW_REQUESTS).

Debug logging

"Deserialize JsonSerializationException: Error setting value to 'Type' on 'Binance.Net.Objects.Models.BinanceRateLimit'. " ... { "rateLimitType": "CONNECTIONS", <--- this "interval": "MINUTE", "intervalNum": 5, "limit": 300 }

JKorf commented 10 months ago

Fixed in the latest version