Class HistoricalQuotesClientExtensions
Set of extension methods for the IHistoricalQuotesClient<TRequest> interface.
Inheritance
Inherited Members
Namespace: Alpaca.Markets.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class HistoricalQuotesClientExtensions
Methods
| Improve this Doc View SourceGetHistoricalQuotesAsAsyncEnumerable<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 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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |