For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 0

Using Eikon Desktop API in Matlab

I need your support for using Eikon Desktop API in Matlab.

Following instructions:

I'm trying, without success, to "traslate" the C# code into Matlab script.

I'm not a developer and I don't know the C# programming language, then I find it difficult to translate examples shown in the tutorial in Matlab script.

My needs are as follows:

  1. Given the ric code (eg "AAPL.O"), I would like to retrieve all the data (fields) available. Specifically, I would like to use the GetViewList method.

(Source:

GetViewList is a method that is part of the "Interface" object ThomsonReuters.Desktop.SDK.DataAccess.TimeSeries.ITimeSeriesDataService

To use it in MATLAB you have to do a workaround (https://www.mathworks.com/matlabcentral/answers/98980-can-i-call-hidden-methods-from-a-net-object-through-the-interface -which-it-tools-in-matlab-7-13).

I created the class in Matlab to load the libraries as shown in the web page example: https://developers.refinitiv.com/en/article-catalog/article/using-eikon-net-sdk-matlab

ts = t.Assembly {1} .AssemblyHandle.GetType('ThomsonReuters.Desktop.SDK.DataAccess.TimeSeries.ITimeSeriesDataService'),

but this object doesn't contain GetViewList method

2. Given the isin code data (eg "US0378331005"), I would like to retrieve all existing trading venue code (ric code).

Specifically, I would like to use the RequestSymbols method (source: https://developers.refinitiv.com/en/api-catalog/eikon/-net-apis-for-use-in-custom-applications/tutorials#symbology)

but I'm not able to create a Matlab script.

3. given the ric code (eg "AAPL.O"), I would like to retrieve time series of closing prices (CLOSE) and daily volumes between a range of arbitrary dates.

I advised the following web pages:

  1. https://developers.refinitiv.com/en/sites/default/files/article_content_files/EikonNETMatlabExample.zip
  2. https://developers.refinitiv.com/en/article-catalog/article/using-eikon-net-sdk-matlab
  3. https://developers.refinitiv.com/en/api-catalog/eikon/-net-apis-for-use-in-custom-applications/tutorials#time-series

but I can't build the script in Matlab that has in output time series of date, price close and volume. Kind Regards,

Mario

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonmatlab
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

Hi Mario,

1. I don't see how the thread on the Mathworks forum you referenced is relevant here. Yes, GetViewsList method is a member of ITimeSeriesDataService interface. In the timeseries data retrieval example in my article I create an instance of ITimeSeriesDataService object and store it in timeSeries variable:

timeSeries = t.Services.TimeSeries;
Then I use timeSeries variable to call SetupDataRequest method, which is a member of ITimeSeriesDataService interface: timeSeries.SetupDataRequest(...)
Similarly you can call GetViewsList method: timeSeries.GetViewsList(...).
In the attached file you can find a complete example in the module named GetTimeSeriesViewListExample.m.
2. Please find an example module named GetRicsForISINExample.m in the attachment. Both example modules in the attached need to be used in conjunction with treikonnet.m module in the example in my article.
3. TimeSeriesExample.m module in the example in my article does almost exactly what you're looking for. All you need to modify is
  • Change the RIC used in timeSeries.SetupDataRequest method.
  • Remove timeSeriesRequestSetup.WithView('BID') call for the request to use the default view
  • To request timeseries between specific dates replace timeSeriesRequestSetup.WithNumberOfPoints with timeSeriesRequestSetup.From and timeSeriesRequestSetup.To
  • Add bar.Volume.Value to timeSeriesDataOutput in DataReceivedCallback function.

examplesformario.zip


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea