forked from alpacahq/alpaca-trade-api-csharp
/
IHistoricalRequest.cs
31 lines (28 loc) · 1.08 KB
/
IHistoricalRequest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
namespace Alpaca.Markets;
// TODO: olegra - rename this interface into IRequestWithPagination
/// <summary>
/// Provides unified type-safe access to the historical data request parameters.
/// </summary>
public interface IHistoricalRequest
{
/// <summary>
/// Gets the pagination parameters for the request (page size and token).
/// </summary>
Pagination Pagination { get; }
}
/// <summary>
/// Provides unified type-safe access to the historical data request parameters.
/// </summary>
/// <typeparam name="TRequest">Historical data request type.</typeparam>
/// <typeparam name="TItem">Historical response data item type.</typeparam>
// ReSharper disable once UnusedTypeParameter
public interface IHistoricalRequest<out TRequest, TItem> : IHistoricalRequest
{
/// <summary>
/// Gets copy of the current request without page token and max allowed page size.
/// </summary>
[UsedImplicitly]
[SuppressMessage("Design",
"CA1024:Use properties where appropriate", Justification = "Factory method")]
TRequest GetValidatedRequestWithoutPageToken();
}