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

ExchangeInfo - Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_016 ... TRD_GRP_020 #1304

Closed KDVMan closed 1 year ago

KDVMan commented 1 year ago

Hello,

library version 9.1.2 literally an hour ago stopped working and gives warnings (and doesn't work)

var result = await this.client.SpotApi.SpotApi.ExchangeData.GetExchangeInfoAsync();

and here are the warnings in the console

2023.09.22 17:24:30:597 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_016, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_016 should added please open an issue on the Github repo 2023.09.22 17:24:30:606 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_017, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_017 should added please open an issue on the Github repo 2023.09.22 17:24:30:609 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_018, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_018 should added please open an issue on the Github repo 2023.09.22 17:24:30:612 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_019, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_019 should added please open an issue on the Github repo 2023.09.22 17:24:30:614 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_020, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_020 should added please open an issue on the Github repo

thank you in advance for your help

KDVMan commented 1 year ago

More warrnings were added today

2023.09.23 14:24:39:843 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_016, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_016 should added please open an issue on the Github repo 2023.09.23 14:24:39:845 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_017, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_017 should added please open an issue on the Github repo 2023.09.23 14:24:39:848 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_018, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_018 should added please open an issue on the Github repo 2023.09.23 14:24:39:850 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_019, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_019 should added please open an issue on the Github repo 2023.09.23 14:24:39:852 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_020, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_020 should added please open an issue on the Github repo 2023.09.23 14:24:39:855 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_021, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_021 should added please open an issue on the Github repo 2023.09.23 14:24:39:857 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_022, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_022 should added please open an issue on the Github repo 2023.09.23 14:24:39:860 | Warning | Cannot map enum value. EnumType: AccountType, Value: TRD_GRP_023, Known values: SPOT, MARGIN, FUTURES, LEVERAGED, TRD_GRP_002, TRD_GRP_003, TRD_GRP_004, TRD_GRP_005, TRD_GRP_006, TRD_GRP_007, TRD_GRP_008, TRD_GRP_009, TRD_GRP_010, TRD_GRP_011, TRD_GRP_012, TRD_GRP_013, TRD_GRP_014, TRD_GRP_015. If you think TRD_GRP_023 should added please open an issue on the Github repo

i.e. 21 22 and 23 more warnings were added.

Is there a way to prevent these warnings from appearing every time? If they appear every time, then every time I have to create a problem here? This is inconvenient, and the application in debugging mode is terribly slow and the request takes a minute to complete.

Where did these warnings even come from? Did Binance add or change something?

JKorf commented 1 year ago

I'll have a look to see if I can prevent new values for this specific enum causing warnings. The warnings are generated in the client, and it happens when a new enum value is returned from the server which can't be mapped to an existing enum value. In this case Binance keeps adding more can more trade groups to the enum causing this warning to appear

KDVMan commented 1 year ago

Aha, thanks, it's very inconvenient that the debug is clogged, and Binance can add new values every day, which will be inconvenient for everyone ))

Thanks again)

IM-001 commented 1 year ago

Came here to report this as well. Thank you!! Indeed, Binance just keeps adding more and more categories without warning in here.

JKorf commented 1 year ago

Has been fixed in version 9.1.3. I also added that new enum values, and this specific enum won't generate new warnings!

KDVMan commented 1 year ago

Thank you very much )

richardu commented 11 months ago

I'm getting this issue with value UNKNOWN_1 but this value doesn't come from Binance. Any idea what's going on?

Thanks, Richard