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?

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @achan

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

    image

    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:

    image

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


Answers

  • 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?

  • @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.