Class StreamingClientExtensions
Set of extension methods for the IStreamingDataClient interface.
Inheritance
Inherited Members
Namespace: Alpaca.Markets.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class StreamingClientExtensions
Methods
| Improve this Doc View SourceGetDailyBarSubscription(IStreamingDataClient, IEnumerable<String>)
Gets the updated aggregate (bar) updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IBar> GetDailyBarSubscription(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IBar> | Subscription object for tracking updates via the Received event. |
GetDailyBarSubscription(IStreamingDataClient, String[])
Gets the daily aggregate (bar) updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IBar> GetDailyBarSubscription(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IBar> | client or symbols argument is null .
|
GetMinuteBarSubscription(IStreamingDataClient, IEnumerable<String>)
Gets the minute aggregate (bar) updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IBar> GetMinuteBarSubscription(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IBar> | Subscription object for tracking updates via the Received event. |
GetMinuteBarSubscription(IStreamingDataClient, String[])
Gets the minute aggregate (bar) updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IBar> GetMinuteBarSubscription(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IBar> | Subscription object for tracking updates via the Received event. |
GetQuoteSubscription(IStreamingDataClient, IEnumerable<String>)
Gets the quote updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IQuote> GetQuoteSubscription(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for quote updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IQuote> | Subscription object for tracking updates via the Received event. |
GetQuoteSubscription(IStreamingDataClient, String[])
Gets the quote updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IQuote> GetQuoteSubscription(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for quote updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IQuote> | Subscription object for tracking updates via the Received event. |
GetTradeSubscription(IStreamingDataClient, IEnumerable<String>)
Gets the trade updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<ITrade> GetTradeSubscription(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for trade updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<ITrade> | Subscription object for tracking updates via the Received event. |
GetTradeSubscription(IStreamingDataClient, String[])
Gets the trade updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<ITrade> GetTradeSubscription(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for trade updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<ITrade> | Subscription object for tracking updates via the Received event. |
GetUpdatedBarSubscription(IStreamingDataClient, IEnumerable<String>)
Gets the daily aggregate (bar) updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IBar> GetUpdatedBarSubscription(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IBar> | Subscription object for tracking updates via the Received event. |
GetUpdatedBarSubscription(IStreamingDataClient, String[])
Gets the updated aggregate (bar) updates subscription for the all assets from the symbols
list.
Declaration
public static IAlpacaDataSubscription<IBar> GetUpdatedBarSubscription(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for minute aggregate (bar) updates subscribing. |
Returns
Type | Description |
---|---|
IAlpacaDataSubscription<IBar> | Subscription object for tracking updates via the Received event. |
SubscribeDailyBarAsync(IStreamingDataClient, IEnumerable<String>)
Gets the daily bar 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<IBar>> SubscribeDailyBarAsync(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeDailyBarAsync(IStreamingDataClient, String)
Gets the daily bar 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<IBar>> SubscribeDailyBarAsync(this IStreamingDataClient client, String symbol)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String | symbol | Alpaca asset name for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeDailyBarAsync(IStreamingDataClient, String[])
Gets the daily bar 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<IBar>> SubscribeDailyBarAsync(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeMinuteBarAsync(IStreamingDataClient, IEnumerable<String>)
Gets the minute bar 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<IBar>> SubscribeMinuteBarAsync(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeMinuteBarAsync(IStreamingDataClient, String)
Gets the minute bar 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<IBar>> SubscribeMinuteBarAsync(this IStreamingDataClient client, String symbol)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String | symbol | Alpaca asset name for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeMinuteBarAsync(IStreamingDataClient, String[])
Gets the minute bar 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<IBar>> SubscribeMinuteBarAsync(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeQuoteAsync(IStreamingDataClient, IEnumerable<String>)
Gets the quote 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<IQuote>> SubscribeQuoteAsync(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for quote updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IQuote>> | Subscription object for tracking updates via the Received event. |
SubscribeQuoteAsync(IStreamingDataClient, String)
Gets the quote 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<IQuote>> SubscribeQuoteAsync(this IStreamingDataClient client, String symbol)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String | symbol | Alpaca asset name for quote updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IQuote>> | Subscription object for tracking updates via the Received event. |
SubscribeQuoteAsync(IStreamingDataClient, String[])
Gets the quote 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<IQuote>> SubscribeQuoteAsync(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for quote updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IQuote>> | Subscription object for tracking updates via the Received event. |
SubscribeTradeAsync(IStreamingDataClient, IEnumerable<String>)
Gets the trade 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>> SubscribeTradeAsync(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for trade updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<ITrade>> | Subscription object for tracking updates via the Received event. |
SubscribeTradeAsync(IStreamingDataClient, String)
Gets the trade 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<ITrade>> SubscribeTradeAsync(this IStreamingDataClient client, String symbol)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String | symbol | Alpaca asset name for trade updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<ITrade>> | Subscription object for tracking updates via the Received event. |
SubscribeTradeAsync(IStreamingDataClient, String[])
Gets the trade 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>> SubscribeTradeAsync(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for trade updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<ITrade>> | Subscription object for tracking updates via the Received event. |
SubscribeUpdatedBarAsync(IStreamingDataClient, IEnumerable<String>)
Gets the updated bar 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<IBar>> SubscribeUpdatedBarAsync(this IStreamingDataClient client, IEnumerable<String> symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
IEnumerable<String> | symbols | Alpaca asset names list (non-empty) for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeUpdatedBarAsync(IStreamingDataClient, String)
Gets the updated bar 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<IBar>> SubscribeUpdatedBarAsync(this IStreamingDataClient client, String symbol)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String | symbol | Alpaca asset name for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |
SubscribeUpdatedBarAsync(IStreamingDataClient, String[])
Gets the updated bar 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<IBar>> SubscribeUpdatedBarAsync(this IStreamingDataClient client, params String[] symbols)
Parameters
Type | Name | Description |
---|---|---|
IStreamingDataClient | client | Target instance of the IStreamingDataClient interface. |
String[] | symbols | Alpaca asset names list (non-empty) for minute bar updates subscribing. |
Returns
Type | Description |
---|---|
ValueTask<IDisposableAlpacaDataSubscription<IBar>> | Subscription object for tracking updates via the Received event. |