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
3 1 2 3

Fetching both TR. and CF_ product fields like Excel Add on

Hello,

i am trying to fetch Fund and Bond data which are on both TR. and CF_ fields. I tested an app like the "Dex2samples" from the "Com Desktop Api" section and i manage to get only TR. fields. When i ask for CF_ i get nothing.

Is there a way to fetch both TR. and CF_ fields with one connection - Query? Some of CF_ fields does not exist in the TR. fields.

Thank you.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-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.

Upvote
Accepted
39.4k 77 11 27

If you use Eikon COM APIs, you cannot commingle TR. fields and CF_ fields in the same request. With Eikon COM APIs you need to use DEX2 library for TR. fields and AdfinX Real-Time library for CF_ fields.
If you use Eikon Data APIs you can commingle TR. fields and CF_ fields in the same get_data method call.

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.

Thank you Alex for your detailed answer.

So in my case is more suitable the DEX2 Library, i ve matched the needed CF to other TR. fields but i have a problem for finding 2-3 fields in TR., it will be great if you help me to identify them.

The fields are:

1) PCTCHNG

2) CF_DATE

The first one is not so important but the second is. I have to find a field that shows me when was the last date that something changed on the funds or the date that after fund stopped, something like that. (the TR. field)

Thank you.

You may want to reach out to Refinitiv Helpdesk and ask them for help in modeling your data retrieval based on your requirements in Excel before implementing it in code. Refinitiv Helpdesk has deep expertise in all datasets available through Eikon and can help you find field names and parameters you need to use to retrieve the data you're interested in. CF_ fields come from real-time streaming market data feed. TR. fields come from historical market data, fundamental and reference data feed. There's some overlap between the two, but there's no equivalent among TR fields for every CF_ field.

PCTCHNG represents percent change between the most recent real-time market data price and previous close price. There's no equivalent for it among TR. fields, as historical market data, fundamental and reference data feed does not provide the most recent market data.

As for CF_DATE field, I'm not sure I understand what you're looking for. I'm afraid the definition you provided ("the last date that something changed on the funds") is rather vague. If you're looking for the date corresponding to the latest close price, you can get it from TR.PriceClose.date. If you're looking for something else, I suggest you reach out to Refinitiv Helpdesk who can help you model your data retrieval in Excel.

Upvotes
3 1 2 3

I understand very clearly, thank you a lot, i believe i can use some other field for "last" date check.

I have one more question if you can help me. My client needs the fields TR.FundTotalReturnLipperRating, TR.FundConsistentReturnLipperRating, TR.FundPreservationLipperRating and also these with the paramater (TimeFrame = 10Y) after the field. On excel and on monitor when i choose to see this values for example for the fund Ric=LP60099969 i take one value for every field and show correctly, but when i try to fetch them from my Dex2 app it returns to me 20 rows for every Ric with the same results and in some rows different. Why these specific fields are treating different from the others? Can i tell the app with some parameter to fetch me only one row for every Ric when i need this fields?

Sorry if i confused you, i am available for any further information you may need, thank you.

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.

Upvotes
39.4k 77 11 27

On my end the following function returns 20 rows of data: =TR("LP60099969","TR.FundTotalReturnLipperRating"), so the experience I have in Excel is consistent with your experience with DEX2 library.
These Lipper ratings are country specific. If you add country to the output: =TR("LP60099969","TR.FundTotalReturnLipperRating","RH=Country"), you will see that the function returns one row per country. You can restrict the output to specific country, in which case the function will return only one row: =TR("LP60099969","TR.FundTotalReturnLipperRating","CtryOfReg=GBR"), and you can use the same parameters to restrict the output in DEX2.
I hope this helps.

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.

Upvotes
3 1 2 3

Hello @Alex Putkov.

yes you helped me a lot, i manage to take these field prices. I have the same problem with 3 more fields and i hope to be the last ones :). I will be grateful to help me on these too. The fields are the below:

TR.FundHoldingName

TR.FundAllocationName

TR.FundPortfolioName

Again with these the api returns to me many empty or duplicate rows, for example i give 50 rics and i take 1000+ rows.

Thank you,

Manos

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'm not sure I understand the issue. Can you give a very specific example?
If you retrieve all 3 of these fields in the same request, then it's perfectly expected that you will see a lot of blanks or nulls in the response. These fields are not related to one another, the number of data points each of these fields returns for a given RIC is different from one field to the next. Therefore when the data is returned as a 2-dimensional table with RICs as row headers and field names as column headers you necessarily will see lots of nulls or blanks.

Upvotes
3 1 2 3

Hello @Alex Putkov. of course i can give an example and i can i guide you to help me because i understand the problem.

For example if i ask the field TR.FundHoldingName for the ric LP60099969 i will get the following list

LP60099969 OTHER ASSETS

LP60099969 SES SA DR

LP60099969 ROYAL DUTCH SHELL PLC B ORD

LP60099969 ORACLE CORP ORD

LP60099969 CITIGROUP INC ORD

LP60099969 ALLERGAN PLC ORD

LP60099969 BP PLC ORD

LP60099969 SAMSUNG ELECTRONICS CO LTD ORD

LP60099969 SINGAPORE TELECOMMUNICATIONS LTD ORD

LP60099969 TEVA PHARMACEUTICAL INDUSTRIES LTD DR

on the eikon product i will get only the first OTHER ASSETS, maybe this is the default. I would like also to take only one row by the api and not all ten. How i can get only the default with field parameter?

Another example for the same ric if i call the TR.FundAllocationName:

LP60099969 Equities LP60099969 Cash & Cash Equivalents LP60099969 Health Care LP60099969 Financials LP60099969 Communication Services LP60099969 Energy LP60099969 Industrials LP60099969 Consumer Staples LP60099969 Information Technology LP60099969 Consumer Discretionary LP60099969 Others LP60099969 Materials LP60099969 United States LP60099969 Others LP60099969 United Kingdom LP60099969 France LP60099969 Japan LP60099969 China LP60099969 Germany LP60099969 Switzerland LP60099969 Korea LP60099969 Netherlands LP60099969 Oracle LP60099969 Royal Dutch Shell LP60099969 SES SA LP60099969 Samsung Electronics LP60099969 Citigroup LP60099969 BP LP60099969 Singapore Telecommunications LP60099969 Roche Holdings LP60099969 Allergan Plc LP60099969 Standard Chartered

Again i need only the first "Equities".

Thank you,

Manos

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.

Upvotes
39.4k 77 11 27

I see now. If you just want the top entry for TR.FundHoldingName you can add EndNum=1 request parameter:

ek.get_data(['LP60099969'], ['TR.FundHoldingName(EndNum=1)'])

I don't see any way to restrict the output for TR.FundAllocationName to a single entry. To explore what parameters and output options are available for a given field use Parameters & Quick Functions tab in Formula Builder wizard in Eikon Excel or Parameters tab in Data Item Browser app in Eikon. See this thread for an illustration.

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.

Upvotes
3 1 2 3

Hello Alex,

yes you are right, there is no option to get only the first - default entry for TR.FundAllocationName. You helped me a lot with the above example and your guideline.

Thank you a lot,

Manos

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.

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.