Show / Hide Table of Contents

Class AlpacaDataStreamingClientExtensions

Helper extension method for creating special version of the IAlpacaDataStreamingClient implementation with automatic reconnection (with configurable delay and number of attempts) support.

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

Methods

| Improve this Doc View Source

GetCancellationSubscription(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the trade cancellation subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<ITrade> GetCancellationSubscription(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<ITrade>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetCancellationSubscription(IAlpacaDataStreamingClient, String[])

Gets the trade cancellation subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<ITrade> GetCancellationSubscription(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<ITrade>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetCancellationSubscription(String)

Declaration
public IAlpacaDataSubscription<ITrade> GetCancellationSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<ITrade>
| Improve this Doc View Source

GetCorrectionSubscription(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the trade corrections subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<ICorrection> GetCorrectionSubscription(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<ICorrection>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetCorrectionSubscription(IAlpacaDataStreamingClient, String[])

Gets the trade corrections subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<ICorrection> GetCorrectionSubscription(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<ICorrection>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetCorrectionSubscription(String)

Declaration
public IAlpacaDataSubscription<ICorrection> GetCorrectionSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<ICorrection>
| Improve this Doc View Source

GetDailyBarSubscription(String)

Declaration
public IAlpacaDataSubscription<IBar> GetDailyBarSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<IBar>
| Improve this Doc View Source

GetLimitUpLimitDownSubscription(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the LULD (limit up / limit down) subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<ILimitUpLimitDown> GetLimitUpLimitDownSubscription(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<ILimitUpLimitDown>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetLimitUpLimitDownSubscription(IAlpacaDataStreamingClient, String[])

Gets the LULD (limit up / limit down) updates subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<ILimitUpLimitDown> GetLimitUpLimitDownSubscription(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<ILimitUpLimitDown>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetLimitUpLimitDownSubscription(String)

Declaration
public IAlpacaDataSubscription<ILimitUpLimitDown> GetLimitUpLimitDownSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<ILimitUpLimitDown>
| Improve this Doc View Source

GetMinuteBarSubscription()

Declaration
public IAlpacaDataSubscription<IBar> GetMinuteBarSubscription()
Returns
Type Description
IAlpacaDataSubscription<IBar>
| Improve this Doc View Source

GetMinuteBarSubscription(String)

Declaration
public IAlpacaDataSubscription<IBar> GetMinuteBarSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<IBar>
| Improve this Doc View Source

GetQuoteSubscription()

Declaration
public IAlpacaDataSubscription<IQuote> GetQuoteSubscription()
Returns
Type Description
IAlpacaDataSubscription<IQuote>
| Improve this Doc View Source

GetQuoteSubscription(String)

Declaration
public IAlpacaDataSubscription<IQuote> GetQuoteSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<IQuote>
| Improve this Doc View Source

GetStatusSubscription(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the trading statuses subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<IStatus> GetStatusSubscription(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<IStatus>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetStatusSubscription(IAlpacaDataStreamingClient, String[])

Gets the trading statuses updates subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<IStatus> GetStatusSubscription(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<IStatus>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetStatusSubscription(String)

Declaration
public IAlpacaDataSubscription<IStatus> GetStatusSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<IStatus>
| Improve this Doc View Source

GetTradeSubscription()

Declaration
public IAlpacaDataSubscription<ITrade> GetTradeSubscription()
Returns
Type Description
IAlpacaDataSubscription<ITrade>
| Improve this Doc View Source

GetTradeSubscription(String)

Declaration
public IAlpacaDataSubscription<ITrade> GetTradeSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<ITrade>
| Improve this Doc View Source

GetUpdatedBarSubscription(String)

Declaration
public IAlpacaDataSubscription<IBar> GetUpdatedBarSubscription(String symbol)
Parameters
Type Name Description
String symbol
Returns
Type Description
IAlpacaDataSubscription<IBar>
| Improve this Doc View Source

SubscribeCancellationAsync(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the trade cancellations updates subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ITrade>> SubscribeCancellationAsync(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ITrade>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeCancellationAsync(IAlpacaDataStreamingClient, String)

Gets the trade cancellations subscription for the symbol asset. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ITrade>> SubscribeCancellationAsync(this IAlpacaDataStreamingClient client, String symbol)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String symbol

Alpaca asset name for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ITrade>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeCancellationAsync(IAlpacaDataStreamingClient, String[])

Gets the trade cancellations updates subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ITrade>> SubscribeCancellationAsync(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ITrade>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeCorrectionAsync(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the trade corrections updates subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ICorrection>> SubscribeCorrectionAsync(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ICorrection>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeCorrectionAsync(IAlpacaDataStreamingClient, String)

Gets the trade corrections subscription for the symbol asset. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ICorrection>> SubscribeCorrectionAsync(this IAlpacaDataStreamingClient client, String symbol)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String symbol

Alpaca asset name for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ICorrection>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeCorrectionAsync(IAlpacaDataStreamingClient, String[])

Gets the trade corrections updates subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ICorrection>> SubscribeCorrectionAsync(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ICorrection>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeLimitUpLimitDownAsync(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the LULD (limit up / limit down) subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ILimitUpLimitDown>> SubscribeLimitUpLimitDownAsync(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ILimitUpLimitDown>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeLimitUpLimitDownAsync(IAlpacaDataStreamingClient, String)

Gets the LULD (limit up / limit down) subscription for the symbol asset. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ILimitUpLimitDown>> SubscribeLimitUpLimitDownAsync(this IAlpacaDataStreamingClient client, String symbol)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String symbol

Alpaca asset name for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ILimitUpLimitDown>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeLimitUpLimitDownAsync(IAlpacaDataStreamingClient, String[])

Gets the LULD (limit up / limit down) subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<ILimitUpLimitDown>> SubscribeLimitUpLimitDownAsync(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<ILimitUpLimitDown>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeStatusAsync(IAlpacaDataStreamingClient, IEnumerable<String>)

Gets the trade corrections updates subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<IStatus>> SubscribeStatusAsync(this IAlpacaDataStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<IStatus>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeStatusAsync(IAlpacaDataStreamingClient, String)

Gets the trading status updates subscription for the symbol asset. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<IStatus>> SubscribeStatusAsync(this IAlpacaDataStreamingClient client, String symbol)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String symbol

Alpaca asset name for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<IStatus>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeStatusAsync(IAlpacaDataStreamingClient, String[])

Gets the trading status updates subscription for all assets from the symbols list. This subscription is returned with pending subscription state and will be unsubscribed on disposing so you can use it inside the using or await using statements for more clear resource management.

Declaration
public static ValueTask<IDisposableAlpacaDataSubscription<IStatus>> SubscribeStatusAsync(this IAlpacaDataStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaDataStreamingClient client

Target instance of the IAlpacaDataStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for minute bar updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<IStatus>>

Subscription object for tracking updates via the Received event.

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