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

Retrieve dividend stock via Python Eikon API

In excel i am able to do the following query:

=TR(stockRIC,"TR.DivExDate;TR.DivType;TR.DivPaymentType;ZAV(TR.DivadjustedGross)","CH=Fd sdate=#1 edate=#2 curn=#3 SORTD=TR.DivExDate DateType=ED",$C$11:$F$92,sdate,edate,currency)

Which results in the following:

How can I do this in Python for a set of stocks? When I do a similar request in Python the dividend of 125 does not show, it give a 0 value.

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apidata
excel-div.png (71.8 KiB)
excel-div2.png (237.1 KiB)
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.

@MICKHERFKENS
Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
-AHS

@MICKHERFKENS

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply.

Otherwise, you may share an answer and then accept it. This will guide all community members who have a similar question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

mjones89 avatar image   mjones89 pimchaya.wongrukun01

Hi, thank you very much for the response. Very helpful. My apologies for the late reply, I was not able to easily find the page. Thanks again.

1 Answer

· Write an Answer
Upvotes
Accepted
98 5 5 15

Hi

Regarding your issue, you can used the following get_data function to retrieve the desired information

>>> start='2019-01-01'
>>> end='2019-03-11'
>>> ric='PSN.L'
>>> currency='GBp'

data, err=ek.get_data(ric,['TR.DivExDate','Tr.DivType','TR.DivPaymentType','ZAV(TR.DivadjustedGross)'],parameters={'Sdate':start,'Edate':end, 'Curn':currency, 'dateType':'ED','SORTD':'TR.DivExDate'})

Hope it help 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.

Thank you for you help! It works and it is what I was looking for.

One extra thing I would like to ask you is what the ZAV() is for? I found the query i posted in an Eikon excel template, but I do not really know what the ZAV() is for. Do you know?


Thank you again for all your help.

Cheers, Mick

You can find these functions in Expression Editor in Formula Builder wizard in Eikon Excel. See screenshots below.

fb.png (59.2 KiB)
ee.png (86.9 KiB)

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.