1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2026-04-13 00:22:22 +00:00
This commit is contained in:
Jkorf 2026-02-20 15:57:34 +01:00
parent 5fa6aa7ed2
commit dce5dae5b4
2 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,6 @@ namespace CryptoExchange.Net.RateLimiting.Filters
/// <inheritdoc /> /// <inheritdoc />
public bool Passes(RateLimitItemType type, RequestDefinition definition, string host, string? apiKey) public bool Passes(RateLimitItemType type, RequestDefinition definition, string host, string? apiKey)
=> definition.Path.StartsWith(_path, StringComparison.OrdinalIgnoreCase); => definition.Path.TrimStart('/').StartsWith(_path, StringComparison.OrdinalIgnoreCase);
} }
} }

View File

@ -80,7 +80,7 @@ namespace CryptoExchange.Net.SharedApis
{ {
// When going descending we can still allow startTime filter to limit the results // When going descending we can still allow startTime filter to limit the results
var now = DateTime.UtcNow; var now = DateTime.UtcNow;
if ((request.Direction != DataDirection.Descending && request.StartTime != null) if ((request.Direction == DataDirection.Ascending && request.StartTime != null)
|| (request.EndTime != null && now - request.EndTime > TimeSpan.FromSeconds(5))) || (request.EndTime != null && now - request.EndTime > TimeSpan.FromSeconds(5)))
{ {
return ArgumentError.Invalid(nameof(GetDepositsRequest.StartTime), $"Time filter is not supported"); return ArgumentError.Invalid(nameof(GetDepositsRequest.StartTime), $"Time filter is not supported");