Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 3 4 5

which field to use for Total Return nos. in excel API. TR.TotalReturn is not working

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apieikon-com-api
icon clock
10 |1500

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

1 Answer

· Write an Answer
Upvotes
Accepted
4.6k 26 7 22

@sujit, a few questions.

Which API are you using? If it is .NET, the Data API does not have access to the fundamental database, only real-time and time series.

Which asset are you looking to get Total Return for? TR.TotalReturn refers to equities.

Here is an example in Excel:

=TR("AAPL.O","TR.TotalReturn","SDate=0D EDate=-1AY")

Here is the same result in the Python API:


icon clock
10 |1500

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

I downloaded single query sample excel book from https://docs-developers.thomsonreuters.com/1535000730857/12020/ that has field list mentioned as TRDPRC_1.HIGH etc. When I replace those fields with TR.TotalReturn, it returns invalid field. But TRDPRC_1.HIGH etc returns valid nos. singlequery.png

singlequery.png (100.5 KiB)

@sujit

You are using an incorrect API. TR.TotalReturn is a fundamental database field, you can access it with an API called DEX - here is the tutorial

@Zhenya Kovalyov Thanks for pointing this out. However, when I try to initialize Dex2 seession, it throws up an error: 53:File not found: PLVbaApis.dll

When I try to add this dll to References-VBA project, it says: Cant add a reference to the specified file

Regard

Sujit

are you running the code in Eikon Excel? Do you have a correct declaration of the function?

Public Declare Function CreateReutersObject Lib "PLVbaApis.dll" (ByVal progID As String) As Object

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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