Show / Hide Table of Contents

Class AlpacaNewsStreamingClientExtensions

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

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

Methods

| Improve this Doc View Source

GetNewsSubscription()

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

GetNewsSubscription(IAlpacaNewsStreamingClient, IEnumerable<String>)

Gets the news articles updates subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<INewsArticle> GetNewsSubscription(this IAlpacaNewsStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaNewsStreamingClient client

Target instance of the IAlpacaNewsStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for news articles updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<INewsArticle>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetNewsSubscription(IAlpacaNewsStreamingClient, String[])

Gets the news articles updates subscription for the all assets from the symbols list.

Declaration
public static IAlpacaDataSubscription<INewsArticle> GetNewsSubscription(this IAlpacaNewsStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaNewsStreamingClient client

Target instance of the IAlpacaNewsStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for news articles updates subscribing.

Returns
Type Description
IAlpacaDataSubscription<INewsArticle>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

GetNewsSubscription(String)

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

SubscribeNewsAsync(IAlpacaNewsStreamingClient, IEnumerable<String>)

Gets the news articles 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<INewsArticle>> SubscribeNewsAsync(this IAlpacaNewsStreamingClient client, IEnumerable<String> symbols)
Parameters
Type Name Description
IAlpacaNewsStreamingClient client

Target instance of the IAlpacaNewsStreamingClient interface.

IEnumerable<String> symbols

Alpaca asset names list (non-empty) for news articles updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<INewsArticle>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeNewsAsync(IAlpacaNewsStreamingClient, String)

Gets the news articles 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<INewsArticle>> SubscribeNewsAsync(this IAlpacaNewsStreamingClient client, String symbol)
Parameters
Type Name Description
IAlpacaNewsStreamingClient client

Target instance of the IAlpacaNewsStreamingClient interface.

String symbol

Alpaca asset name for news articles updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<INewsArticle>>

Subscription object for tracking updates via the Received event.

| Improve this Doc View Source

SubscribeNewsAsync(IAlpacaNewsStreamingClient, String[])

Gets the news articles 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<INewsArticle>> SubscribeNewsAsync(this IAlpacaNewsStreamingClient client, params String[] symbols)
Parameters
Type Name Description
IAlpacaNewsStreamingClient client

Target instance of the IAlpacaNewsStreamingClient interface.

String[] symbols

Alpaca asset names list (non-empty) for news articles updates subscribing.

Returns
Type Description
ValueTask<IDisposableAlpacaDataSubscription<INewsArticle>>

Subscription object for tracking updates via the Received event.

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