LSEG Data Library for .NET

AddItems

Allows to add items to the stream, even when the stream has been already opened.

We can even specify the incoming fields for the requested instrument.

Syntax

void AddItems(params string[] items)

void AddItems(IEnumerable<string> items)

void AddItems(IEnumerable<string> items, IEnumerable<string> fields)

Usage

The following example demonstrates how to add items to a pricing stream.

var stream = Pricing.Definition("EUR=").GetStream();

stream.Open();

// Add one item or a list of items
stream.AddItems("MSFT.O");
stream.AddItems(new[] { "EUR=", "GBP=", "CAD=" }); 

// Add a list of items, in this case one, and a specified list of fields to be retrieved for it
stream.AddItems(new[] { "AAPL.O" }, new[] { "BID", "ASK", "HST_CLOSE", "IRGPRC", "DSPLY_NAME" });

stream.Close();