Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CryptoExchange.Net ratelimit update #6

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mexc.Net.UnitTests/JsonTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class JsonTests
private JsonToObjectComparer<IMexcRestClient> _comparer = new JsonToObjectComparer<IMexcRestClient>((json) => TestHelpers.CreateResponseClient(json, options =>
{
options.ApiCredentials = new ApiCredentials("123", "123");
options.SpotOptions.RateLimiters = new List<IRateLimiter>();
options.RateLimiterEnabled = false;
options.SpotOptions.AutoTimestamp = false;
}));

Expand Down
4 changes: 2 additions & 2 deletions Mexc.Net/Clients/SpotApi/MexcRestClientSpotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ protected override AuthenticationProvider CreateAuthenticationProvider(ApiCreden

internal async Task<WebCallResult<T>> SendRequestInternal<T>(string path, HttpMethod method, CancellationToken cancellationToken,
Dictionary<string, object>? parameters = null, bool signed = false, HttpMethodParameterPosition? postPosition = null,
ArrayParametersSerialization? arraySerialization = null, int weight = 1, bool ignoreRateLimit = false) where T : class
ArrayParametersSerialization? arraySerialization = null) where T : class
{
var result = await SendRequestAsync<T>(new Uri(BaseAddress.AppendPath(path)), method, cancellationToken, parameters, signed, null, postPosition, arraySerialization, weight, ignoreRatelimit: ignoreRateLimit).ConfigureAwait(false);
var result = await SendRequestAsync<T>(new Uri(BaseAddress.AppendPath(path)), method, cancellationToken, parameters, signed, null, postPosition, arraySerialization, 0).ConfigureAwait(false);
if (!result && result.Error!.Code == 700003 && (ApiOptions.AutoTimestamp ?? ClientOptions.AutoTimestamp))
{
_logger.Log(LogLevel.Debug, "Received Invalid Timestamp error, triggering new time sync");
Expand Down
2 changes: 1 addition & 1 deletion Mexc.Net/Mexc.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CryptoExchange.Net" Version="7.2.0" />
<PackageReference Include="CryptoExchange.Net" Version="7.3.0" />
</ItemGroup>
</Project>
Loading