Show / Hide Table of Contents

Class HistoricalQuotesClientExtensions

Set of extension methods for the IHistoricalQuotesClient<TRequest> interface.

Inheritance
System.Object
HistoricalQuotesClientExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Alpaca.Markets.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class HistoricalQuotesClientExtensions

Methods

| Improve this Doc View Source

GetHistoricalQuotesAsAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.ListHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of items (in form of interface) so they can be consumed by the await foreach statement on the caller side.

Declaration
public static IAsyncEnumerable<IQuote> GetHistoricalQuotesAsAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical quotes request (with empty next page token).

Returns
Type Description
IAsyncEnumerable<IQuote>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesAsAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest, CancellationToken)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.ListHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of items (in form of interface) so they can be consumed by the await foreach statement on the caller side.

Declaration
public static IAsyncEnumerable<IQuote> GetHistoricalQuotesAsAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request, CancellationToken cancellationToken)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical quotes request (with empty next page token).

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
IAsyncEnumerable<IQuote>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesDictionaryOfAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.GetHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of items (in form of dictionary of the interface instances) so they can be consumed by the await foreach statement on the caller side.

Declaration
public static IReadOnlyDictionary<String, IAsyncEnumerable<IQuote>> GetHistoricalQuotesDictionaryOfAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical minute bars request (with empty next page token).

Returns
Type Description
IReadOnlyDictionary<String, IAsyncEnumerable<IQuote>>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesDictionaryOfAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest, CancellationToken)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.GetHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of items (in form of dictionary of the interface instances) so they can be consumed by the await foreach statement on the caller side.

Declaration
public static IReadOnlyDictionary<String, IAsyncEnumerable<IQuote>> GetHistoricalQuotesDictionaryOfAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request, CancellationToken cancellationToken)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical minute bars request (with empty next page token).

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
IReadOnlyDictionary<String, IAsyncEnumerable<IQuote>>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesMultiPagesAsAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.ListHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of response pages with items so they can be consumed by the await foreach statement on the caller side as sequence of 'batches' instead of sequence of items itself.

Declaration
public static IAsyncEnumerable<IReadOnlyDictionary<String, IReadOnlyList<IQuote>>> GetHistoricalQuotesMultiPagesAsAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical quotes request (with empty next page token).

Returns
Type Description
IAsyncEnumerable<IReadOnlyDictionary<String, IReadOnlyList<IQuote>>>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesMultiPagesAsAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest, CancellationToken)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.ListHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of response pages with items so they can be consumed by the await foreach statement on the caller side as sequence of 'batches' instead of sequence of items itself.

Declaration
public static IAsyncEnumerable<IReadOnlyDictionary<String, IReadOnlyList<IQuote>>> GetHistoricalQuotesMultiPagesAsAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request, CancellationToken cancellationToken)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical quotes request (with empty next page token).

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
IAsyncEnumerable<IReadOnlyDictionary<String, IReadOnlyList<IQuote>>>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesPagesAsAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.ListHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of response pages with items so they can be consumed by the await foreach statement on the caller side as sequence of 'batches' instead of sequence of items itself.

Declaration
public static IAsyncEnumerable<IReadOnlyList<IQuote>> GetHistoricalQuotesPagesAsAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical quotes request (with empty next page token).

Returns
Type Description
IAsyncEnumerable<IReadOnlyList<IQuote>>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetHistoricalQuotesPagesAsAsyncEnumerable<TRequest>(IHistoricalQuotesClient<TRequest>, TRequest, CancellationToken)

Gets all items provided by Alpaca.Markets.IHistoricalQuotesClient`1.ListHistoricalQuotesAsync(`0,System.Threading.CancellationToken) in pagination mode as single stream of response pages with items so they can be consumed by the await foreach statement on the caller side as sequence of 'batches' instead of sequence of items itself.

Declaration
public static IAsyncEnumerable<IReadOnlyList<IQuote>> GetHistoricalQuotesPagesAsAsyncEnumerable<TRequest>(this IHistoricalQuotesClient<TRequest> client, TRequest request, CancellationToken cancellationToken)
    where TRequest : HistoricalRequestBase, IHistoricalRequest<TRequest, IQuote>
Parameters
Type Name Description
IHistoricalQuotesClient<TRequest> client

Target instance of the IHistoricalQuotesClient<TRequest> interface.

TRequest request

Original historical quotes request (with empty next page token).

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
IAsyncEnumerable<IReadOnlyList<IQuote>>
Type Parameters
Name Description
TRequest
Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX