Show / Hide Table of Contents

Class AlpacaOptionsDataClientExtensions

Set of extension methods for the IAlpacaOptionsDataClient interface.

Inheritance
System.Object
AlpacaOptionsDataClientExtensions
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 AlpacaOptionsDataClientExtensions

Methods

| Improve this Doc View Source

GetOptionChainAsyncAsAsyncEnumerable(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 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

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 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

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 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

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 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