mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-04-13 00:22:22 +00:00
wip
This commit is contained in:
parent
5fa6aa7ed2
commit
dce5dae5b4
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user