RateLimiters don't seem to like the GeneralApi.SubAccount.AddIpToWhitelistForApiKeyAsync method
See original GitHub issueDescribe the bug When trying to use the GeneralApi.SubAccount.AddIpToWhitelistForApiKeyAsync Method, the RateLimiter fails with the following error “Sequence contains no elements” and stack trace
System.InvalidOperationException:
at System.Linq.ThrowHelper.ThrowNoElementsException (System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at CryptoExchange.Net.Objects.RateLimiter+<ProcessTopic>d__9.MoveNext (CryptoExchange.Net, Version=5.1.1.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at CryptoExchange.Net.Objects.RateLimiter+<LimitRequestAsync>d__8.MoveNext (CryptoExchange.Net, Version=5.1.1.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at CryptoExchange.Net.BaseRestClient+<SendRequestAsync>d__231.MoveNext (CryptoExchange.Net, Version=5.1.1.0, Culture=neutral, PublicKeyToken=null) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Binance.Net.Clients.GeneralApi.BinanceClientGeneralApi+<SendRequestInternal>d__211.MoveNext (Binance.Net, Version=8.0.3.0, Culture=neutral, PublicKeyToken=null) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter.GetResult (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Binance.Net.Clients.GeneralApi.BinanceClientGeneralApiSubAccount+<AddIpToWhitelistForApiKeyAsync>d__55.MoveNext (Binance.Net, Version=8.0.3.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at ClintUX.Controllers.UserController+<IPAdd>d__5.MoveNext (ClintUX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\Users\andre\source\repos\ClintMethod\ClintUX\Controllers\UserController.cs:137)
To Reproduce Use a TotalRateLimiter and try to add an IP address to the whitelist of a given binance account. If RateLimiters list is left empty the request is successfull
Expected behavior The Request completes successfully
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Each request has a specific weight, most just weigh 1, but the AddIpToWhitelistForApiKeyAsync request has a weight of 3000.
The 1200 limit is for /api/ endpoints, the /sapi/ endpoints which the whitelist is part of has a limit of 12000, see https://binance-docs.github.io/apidocs/spot/en/#limits
Jesús Christ, I didn’t expect the weight of that one to be 3k 😳 makes sense now
Enviado desde mi iPhone