private HistoricalCryptoTradesRequest( HistoricalCryptoTradesRequest request, IEnumerable <CryptoExchange> exchanges) : base(request.Symbols, request.TimeInterval, request.Exchanges.Concat(exchanges)) { }
private async Task <IMultiPage <ITrade> > getHistoricalTradesAsync( HistoricalCryptoTradesRequest request, CancellationToken cancellationToken = default) => await _httpClient.GetAsync <IMultiPage <ITrade>, JsonMultiTradesPage>( await request.EnsureNotNull(nameof(request)).Validate() .GetUriBuilderAsync(_httpClient).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
public Task <IMultiPage <ITrade> > GetHistoricalTradesAsync( HistoricalCryptoTradesRequest request, CancellationToken cancellationToken = default) => request.Symbols.Count == 1 ? listHistoricalTradesAsync(request, cancellationToken).AsMultiPageAsync <ITrade, JsonMultiTradesPage>() : getHistoricalTradesAsync(request, cancellationToken);