Class AlpacaOptionsDataClientExtensions
Set of extension methods for the IAlpacaOptionsDataClient interface.
Inheritance
Inherited Members
Namespace: Alpaca.Markets.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class AlpacaOptionsDataClientExtensions
Methods
| Improve this Doc View SourceGetOptionChainAsyncAsAsyncEnumerable(IAlpacaOptionsDataClient, OptionChainRequest)
Gets all option snapshots from Alpaca REST API endpoint as async enumerable stream.
Declaration
public static IAsyncEnumerable<IOptionSnapshot> GetOptionChainAsyncAsAsyncEnumerable(this IAlpacaOptionsDataClient client, OptionChainRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaOptionsDataClient | client | The IAlpacaOptionsDataClient object instance. |
OptionChainRequest | request | Account activities request parameters. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IOptionSnapshot> | Option contacts' snapshots obtained page by page. |
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. |
GetOptionChainAsyncAsAsyncEnumerable(IAlpacaOptionsDataClient, OptionChainRequest, CancellationToken)
Gets all option snapshots from Alpaca REST API endpoint as async enumerable stream.
Declaration
public static IAsyncEnumerable<IOptionSnapshot> GetOptionChainAsyncAsAsyncEnumerable(this IAlpacaOptionsDataClient client, OptionChainRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaOptionsDataClient | client | The IAlpacaOptionsDataClient object instance. |
OptionChainRequest | request | Account activities request parameters. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IOptionSnapshot> | Option contacts' snapshots obtained page by page. |
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. |
ListSnapshotsAsAsyncEnumerable(IAlpacaOptionsDataClient, OptionSnapshotRequest)
Gets all option snapshots from Alpaca REST API endpoint as async enumerable stream.
Declaration
public static IAsyncEnumerable<IOptionSnapshot> ListSnapshotsAsAsyncEnumerable(this IAlpacaOptionsDataClient client, OptionSnapshotRequest request)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaOptionsDataClient | client | The IAlpacaOptionsDataClient object instance. |
OptionSnapshotRequest | request | Account activities request parameters. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IOptionSnapshot> | Option contacts' snapshots obtained page by page. |
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. |
ListSnapshotsAsAsyncEnumerable(IAlpacaOptionsDataClient, OptionSnapshotRequest, CancellationToken)
Gets all option snapshots from Alpaca REST API endpoint as async enumerable stream.
Declaration
public static IAsyncEnumerable<IOptionSnapshot> ListSnapshotsAsAsyncEnumerable(this IAlpacaOptionsDataClient client, OptionSnapshotRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IAlpacaOptionsDataClient | client | The IAlpacaOptionsDataClient object instance. |
OptionSnapshotRequest | request | Account activities request parameters. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<IOptionSnapshot> | Option contacts' snapshots obtained page by page. |
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. |