Class AlpacaDataClientExtensions
Set of extension methods for the IAlpacaDataClient interface.
Inheritance
Inherited Members
Namespace: Alpaca.Markets.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class AlpacaDataClientExtensions
Methods
| Improve this Doc View SourceGetHistoricalAuctionsAsAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction> GetHistoricalAuctionsAsAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions request (with empty next page token). |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IAuction> |
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. |
GetHistoricalAuctionsAsAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction> GetHistoricalAuctionsAsAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions 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<IAuction> |
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. |
GetHistoricalAuctionsDictionaryOfAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.GetHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction>> GetHistoricalAuctionsDictionaryOfAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions request (with empty next page token). |
Returns
Type | Description |
---|---|
IReadOnlyDictionary<String, IAsyncEnumerable<IAuction>> |
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. |
GetHistoricalAuctionsDictionaryOfAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.GetHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction>> GetHistoricalAuctionsDictionaryOfAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions 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<IAuction>> |
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. |
GetHistoricalAuctionsMultiPagesAsAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.GetHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction>>> GetHistoricalAuctionsMultiPagesAsAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions request (with empty next page token). |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IReadOnlyDictionary<String, IReadOnlyList<IAuction>>> |
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. |
GetHistoricalAuctionsMultiPagesAsAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.GetHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction>>> GetHistoricalAuctionsMultiPagesAsAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions 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<IAuction>>> |
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. |
GetHistoricalAuctionsPagesAsAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction>> GetHistoricalAuctionsPagesAsAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions request (with empty next page token). |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IReadOnlyList<IAuction>> |
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. |
GetHistoricalAuctionsPagesAsAsyncEnumerable(IAlpacaDataClient, HistoricalAuctionsRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListHistoricalAuctionsAsync(Alpaca.Markets.HistoricalAuctionsRequest,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<IAuction>> GetHistoricalAuctionsPagesAsAsyncEnumerable(this IAlpacaDataClient client, HistoricalAuctionsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
HistoricalAuctionsRequest | request | Original historical auctions 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<IAuction>> |
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. |
GetNewsArticlesAsAsyncEnumerable(IAlpacaDataClient, NewsArticlesRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListNewsArticlesAsync(Alpaca.Markets.NewsArticlesRequest,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<INewsArticle> GetNewsArticlesAsAsyncEnumerable(this IAlpacaDataClient client, NewsArticlesRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
NewsArticlesRequest | request | Original historical minute bars request (with empty next page token). |
Returns
Type | Description |
---|---|
IAsyncEnumerable<INewsArticle> |
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. |
GetNewsArticlesAsAsyncEnumerable(IAlpacaDataClient, NewsArticlesRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListNewsArticlesAsync(Alpaca.Markets.NewsArticlesRequest,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<INewsArticle> GetNewsArticlesAsAsyncEnumerable(this IAlpacaDataClient client, NewsArticlesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
NewsArticlesRequest | 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.
The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.
|
Returns
Type | Description |
---|---|
IAsyncEnumerable<INewsArticle> |
GetNewsArticlesPagesAsAsyncEnumerable(IAlpacaDataClient, NewsArticlesRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListNewsArticlesAsync(Alpaca.Markets.NewsArticlesRequest,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<INewsArticle>> GetNewsArticlesPagesAsAsyncEnumerable(this IAlpacaDataClient client, NewsArticlesRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
NewsArticlesRequest | request | Original historical news articles request (with empty next page token). |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IReadOnlyList<INewsArticle>> |
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. |
GetNewsArticlesPagesAsAsyncEnumerable(IAlpacaDataClient, NewsArticlesRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListNewsArticlesAsync(Alpaca.Markets.NewsArticlesRequest,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<INewsArticle>> GetNewsArticlesPagesAsAsyncEnumerable(this IAlpacaDataClient client, NewsArticlesRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
NewsArticlesRequest | request | Original historical news articles 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.
The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.
|
Returns
Type | Description |
---|---|
IAsyncEnumerable<IReadOnlyList<INewsArticle>> |
ListCorporateActionsAsAsyncEnumerable(IAlpacaDataClient, CorporateActionsRequest)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListCorporateActionsAsync(Alpaca.Markets.CorporateActionsRequest,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<ICorporateActionsResponse> ListCorporateActionsAsAsyncEnumerable(this IAlpacaDataClient client, CorporateActionsRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
CorporateActionsRequest | request | Original historical minute bars request (with empty next page token). |
Returns
Type | Description |
---|---|
IAsyncEnumerable<ICorporateActionsResponse> |
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. |
ListCorporateActionsAsAsyncEnumerable(IAlpacaDataClient, CorporateActionsRequest, CancellationToken)
Gets all items provided by Alpaca.Markets.IAlpacaDataClient.ListCorporateActionsAsync(Alpaca.Markets.CorporateActionsRequest,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<ICorporateActionsResponse> ListCorporateActionsAsAsyncEnumerable(this IAlpacaDataClient client, CorporateActionsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaDataClient | client | Target instance of the IAlpacaDataClient interface. |
CorporateActionsRequest | 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.
The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.
|
Returns
Type | Description |
---|---|
IAsyncEnumerable<ICorporateActionsResponse> |