Upgrading to Workspace

We will be discontinuing the Eikon Desktop soon in favour of our next generation data and analytics workflow solution, LSEG Workspace. This page is designed to help you assess any changes you may need to make to programmatic (API) workflows. We also provide resources here to help you make those changes as well.

Eikon 4 Desktop API (dotNet) Upgrade:

Timeseries

The Time Series or Historical Pricing services available in both libraries provide the ability to retrieve time series bars in intervals such as 1-minutes, 5-minute, 30-minute, etc as well as interday intervals including daily, weekly, monthly, etc.  In addition, both libraries provide the facility of streaming pricing bars in real-time. However, there are subtle differences in the interfaces and features that we'll outline.

Eikon .Net APIs

What does 'ITimesSeriesDataService' provide?

This functionality is used to retrieve historical time-series bars as well as the ability to open subscriptions to update and insert new bars, in real-time.  The service segments the collection of historical fields within Views which define a set of related fields for a given asset type.  For example, users can request for an asset and define a specific View, such as the 'TRDPRC_1' view defining the OHLC (Open/High/Low/Close) view.  Or if they are interested in quotes (BID or ASK) related fields, they have the option of narrowing down their views to these specific related fields.  In addition, the service supports the ability to query this metadata to capture the available Views along with the intervals that support these views and some useful details related to the time range available for the different intervals.

The following demonstrates how to retrieve the last 10 bars:

    	
            

...

Console.WriteLine("[2] Time series request example");
Console.WriteLine("");

 

// Request for daily bars using the default View (OHLC details)
request = timeSeries.SetupDataRequest("VOD.L")
                .WithInterval(CommonInterval.Daily)
                .WithNumberOfPoints(10)
                .OnDataReceived(DataReceivedCallback)
                .CreateAndSend();

...

private void DataReceivedCallback(DataChunk chunk)
{
    foreach (IBarData bar in chunk.Records.ToBarRecords())
    {
         if (bar.Open.HasValue && bar.High.HasValue && bar.Low.HasValue && bar.Close.HasValue &&
             bar.Timestamp.HasValue)
         {
              Console.WriteLine(
                        "{0}: {1} OHLC {2} {3} {4} {5}",
                        bar.Timestamp.Value.ToShortDateString(),
                        chunk.Ric,
                        bar.Open.Value.ToString("##.0000"),
                        bar.High.Value.ToString("##.0000"),
                        bar.Low.Value.ToString("##.0000"),
                        bar.Close.Value.ToString("##.0000")
                    );
                };
           }
       }
    }
}

To support the ability to open a subscription to receive the historical bars but also keep track of new updates and bars inserted is available within the following code segment:

    	
            

...

Console.WriteLine("[3] Time series subscription example");
Console.WriteLine("");


// Request for 1-minute bars
subscription = timeSeries.SetupDataSubscription("VOD.L")
                            .WithInterval(CommonInterval.Intraday1Minute)
                            .WithNumberOfPoints(10)
                            .OnDataReceived(DataReceivedCallback)
                            .OnDataUpdated(DataUpdatedCallback)
                            .CreateAndStart();

...

private void DataReceivedCallback(DataChunk chunk)
{
     foreach (IBarData bar in chunk.Records.ToBarRecords())
          DisplayValues(chunk.Ric, bar, "Insert");


          if (chunk.IsLast)
                Console.WriteLine("------------------------------------------------");
}

 

private void DataUpdatedCallback(IDataUpdate dataUpdate)
{
      IBarData bar = dataUpdate.Records.ToBarRecords().FirstOrDefault();

      if (dataUpdate.UpdateType == UpdateType.NewPoint)
      {
           Console.WriteLine("===========INSERT==============");
           DisplayValues(dataUpdate.Ric, bar, "Insert");
      }
      else
      {
           DisplayValues(dataUpdate.Ric, bar, "Update");
      }
}

 

private void DisplayValues(string ric, IBarData bar, string label)
{
     if (bar.Open.HasValue && bar.High.HasValue && bar.Low.HasValue && bar.Close.HasValue &&
         bar.Volume.HasValue && bar.Timestamp.HasValue)
     {
          Console.WriteLine(
                    "{0} {1}: OHLC {2} {3} {4} {5} {6} Vol: {7}",
                    label,
                    bar.Timestamp.Value.ToLongTimeString(),
                    ric,
                    bar.Open.Value.ToString("##.0000"),
                    bar.High.Value.ToString("##.0000"),
                    bar.Low.Value.ToString("##.0000"),
                    bar.Close.Value.ToString("##.0000"),
                    bar.Volume.Value.ToString()
             );
       };
}

As expected, we received the historical bars requested - similar to the previous example. Because we opened a subscription, we can observe updates to the most recent bar.  However, changes do not show deltas based on the most recent bar, but instead the library presents all values.  Users will to need to compare with the latest bar to confirm which values have changed .  This is evident in the output where the entire update record includes all fields within the view.  And as expected, when we move to the next minute, a new bar is inserted into the collection followed by updates.  This trend continues.

Data Library for .Net

The Data Library for .Net provides an equivalent service allowing developers to request for historical bars but also register interest opening a stream to receive real-time updates to existing bars and the ability to deliver new bars as we saw within the Eikon .Net API.  However, there are some key distinctions between the 2 libraries:

  • Views
    The Data Library for .Net does not have the concept of Views nor does it provide the ability to request which fields are associated with which interval and the data range available.  The Data Library for .Net is based on the HPA (Historical Pricing API) that presents all available fields for the selected asset and interval.

  • Updates
    The Data Library for .Net delivers only those fields that have changed based on the market activity.  Specifically, users can easily observe the deltas much like what you would observe when you interface with a typical real-time service.

  • Built-in filtering
    The Data Library for .Net does not support built-in filtering.  It is the developers responsibility to extend any desired filtering when the raw data arrives.

What does 'Data.Content.HistoricalPricing' provide?

The HistoricalPricing interface provides the ability to request for historical bars based on the selected interval but also open a subscription to the request to retrieve updates and inserts based on market activity.  When defining your historical pricing stream, the user provides a lambda (or callback) to capture both inserts (new bars) or updates (to the most recent bar).

The following demonstrates how to retrieve the last 10 bars:

    	
            

// Retrieve Interday Summaries with P1D (1-day interval).  
var response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.P1D)
                                            .Fields("OPEN_PRC", "HIGH_1", "LOW_1", "TRDPRC_1", "ACVOL_UNS")
                                            .Count(10)
                                            .GetData();

 

// Use common display routine to display response
Common.DisplayTable("Historical Interday Summaries", response);

The above request explicitly specifies the equivalent fields (OHLC) as we saw in the Eikon .Net API.  If no fields were specified, the service would return all available fields for the specified instrument/interval.  For the sake of readability, we have suppressed the common function of displaying the result to the console.  Users can review this code at their own leisure within the example package.

To support the ability to open a stream to receive the historical bars but also keep track of new updates and bars inserted is available within the following code segment:

    	
            

// Create a Historical Pricing stream - specifying the desired 'intraday' interval
var stream = Summaries.Definition("VOD.L").Fields("OPEN_PRC", "HIGH_1", "LOW_1", "TRDPRC_1", "ACVOL_UNS")
                                  .Interval(Summaries.Interval.PT1M)
                                  .Count(10)
                                  .GetStream();

 

// Specify the TSI lambda expressions to capture 'Insert' and 'Update' events
stream.OnInsert((data, stream) => Common.DisplayTable($"INSERT: {DateTime.Now}", data.Table))
      .OnUpdate((data, stream) => Common.DisplayTable($"UPDATE: {DateTime.Now}", data.Table))
      .OnStatus((status, stream) => Console.WriteLine($"Status: {status}"))
      .OnError((error, stream) => Console.WriteLine($"Error: {error}"))
      .Open();

Similar to the Eikon .Net API, we received the historical bars based on our request..  When we opened a stream, we can see a number of updates and based on the interval, Inserts representing new historical bars, in real-time.  However, we do not receive all fields for each update, only those fields that have been affected by the activity in the market.

Conclusion

Moving from your Eikon .Net API to the Data Library for .Net should provide you with a path to acquire the desired content within your applications.  As we continue to improve and expand our content set, we anticipate there may be some differences.  The goal of this article is to provide solutions that not only meet your needs but hopefully include additional value not present with the legacy platform.   Please report any issues or challenges within our Q&A site using the tag: workspace-upgrade and we'll continue to update this article to do our best to ensure we can provide a suitable migration path.