/// <inheritdoc />
 public async Task <IReadOnlyList <IAsset> > ListAssetsAsync(
     AssetsRequest request,
     CancellationToken cancellationToken = default) =>
 await _httpClient.GetAsync <IReadOnlyList <IAsset>, List <JsonAsset> >(
     await request.EnsureNotNull(nameof(request))
     .GetUriBuilderAsync(_httpClient).ConfigureAwait(false),
     cancellationToken).ConfigureAwait(false);
        /// <summary>
        /// Gets list of available assets from Alpaca REST API endpoint.
        /// </summary>
        /// <param name="request">Asset list request parameters.</param>
        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        /// <returns>Read-only list of asset information objects.</returns>
        public Task <IReadOnlyList <IAsset> > ListAssetsAsync(
            AssetsRequest request,
            CancellationToken cancellationToken = default)
        {
            request.EnsureNotNull(nameof(request));

            var builder = new UriBuilder(_httpClient.BaseAddress)
            {
                Path  = _httpClient.BaseAddress.AbsolutePath + "assets",
                Query = new QueryBuilder()
                        .AddParameter("status", request.AssetStatus)
                        .AddParameter("asset_class", request.AssetClass)
            };

            return(_httpClient.GetObjectsListAsync <IAsset, JsonAsset>(
                       _alpacaRestApiThrottler, builder, cancellationToken));
        }
 /// <inheritdoc />
 public Task <IReadOnlyList <IAsset> > ListAssetsAsync(
     AssetsRequest request,
     CancellationToken cancellationToken = default) =>
 _httpClient.GetAsync <IReadOnlyList <IAsset>, List <JsonAsset> >(
     request.EnsureNotNull(nameof(request)).GetUriBuilder(_httpClient),
     cancellationToken, _alpacaRestApiThrottler);