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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
33 0 2 2

How to use PCTCHG_WTD and other data items not starting with "TR."

Hi,

I have found that some data items don't return a value using the Python Eikon API. They seem to be ones that are not prefixed with "TR.", which is at the start of most data items in Eikon. Specifically right now, I am having trouble with "PCTCHG_WTD". Below is an example, where 'PCTCHG_WTD returns nothing.

Within the Eikon application, PCTCHG_WTD is a live streaming data item, which is why I want to use it, and not TR.PricePctChgWTD, which only updates once a day. I want the most recent number.

Can you please tell me how to use 'PCTCHG_WTD, PCTCHG_MTD and other data items that don't start with "TR."?

Thanks

msft = ek.get_data('MSFT.O', ['TR.CompanyName',
                             'TR.GICSSector',
                             'TR.SharesOutstanding',
                             'CF_Last',
                             'PCTCHG_WTD'
                            ])[0]



eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
18k 21 12 20

Hi @Noel

These are fields from realtime database, you can use Quote app or "Data Item Browser" app to check if these fields are supported on the instrument or not?

For example, MSFT.O does not support PCTCHG_WTD


ahs1.png (132.4 KiB)
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.

Thanks for replying. That is interesting. However, i AM able to add this field in the Monitor app in Eikon. And it gives me live data. So I wonder if there is a way to access it through the API.

See the attache picture.

msft-monitor.jpg (30.1 KiB)

Hi @Noel

No, you cannot access PCTCHG_MTD field on MSFT.O with API.


I think that Monitor app may use TR.PricePctChgMTD field instead.

Or the app may has some logic behind the scene to calculate the live update.


If you want to know which fields are supported on a specific instrument, you can use "Data Item Browser" as I mentioned in my answer earlier.

Click below to post an Idea Post Idea