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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

Extract dividend records by excluding specific dividend type in Eikon API getdata() call

I am trying to get dividend records for ALSO.PA which dividend type is NOT "Special" via Eikon API.

The following call returns 3 records -- 2 with divtype=Final and 1 with divtype=Specific:

get_data?symbol= ALSO.PA&fields=TR.DivUnadjustedGross|TR.DivCurr|TR.DivExDate|TR.DivType&start_date=2019-01-01&end_date=2021-05-31

How/where can I specify the dividend type to exclude (Special), so this call only return the 2 records with TR.divtype=Final?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikon
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.

Upvotes
Accepted
38.1k 71 35 53

@achan

You can specify the DivType to 61 which represents the Final type.

The code in Python looks like this:

df, err = ek.get_data('ALSO.PA' , 
             ['TR.DivUnadjustedGross','TR.DivCurr','TR.DivExDate', 'TR.DivType'],
             {'SDate': '2019-01-01', 'EDate': '2021-05-31','DivType':'61'})

The output is:

For more information, you can refer to the Data Item Browser tool to find more parameters used in the request.



1622537908496.png (24.5 KiB)
1622537957807.png (24.5 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.

Thank you @jirapongse.phuriphanvichai.

1 follow-up question: Is there a way to express as excluding specific div type instead of including specific div type? E.g. I would like to get all divtypes except special dividends, how can I express it without including all of the many other dividend types?

Upvote
38.1k 71 35 53

@achan

From the available options, it seems that it can only include the DivTypes. You can specify multiple DivTypes, as shown below.

df, err = ek.get_data('ALSO.PA' , 
             ['TR.DivUnadjustedGross','TR.DivCurr','TR.DivExDate', 'TR.DivType'],
             {'SDate': '2019-01-01', 'EDate': '2021-05-31','DivType':'61:70'})

However, you can directly contact the Eikon support team via MyRefinitiv to confirm it.

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.

Click below to post an Idea Post Idea