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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythondata
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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
25 0 1 2

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 5.0 MiB each and 10.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)
Click below to post an Idea Post Idea