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

Dividen data and date data fields together in Python code

Hi,

I am trying to get both dividend data and date in time series using following:

df, err = ek.get_data(

instruments = ['HYG'],

fields = ['TR.DivAdjustedGross(EDate=-1AW,SDate=2013-01-01)']

)

It gets only dividend data but does not show date. How do I write query to fetch both date(when it was declared or distributed) and dividend

Regards,

RS

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 11 27

@rsharan

There's a number of dates associated with each dividend, and there's a field name for each of those dates, e.g. TR.DivAnnouncementDate, TR.DivExDate, TR.DivPayDate, TR.DivPeriodEndDate etc. Use CodeCreator app in Eikon application to search the field names for the data items you're interested in and to help you construct the data retrieval expression.

ek.get_data('HYG', ['TR.DivAnnouncementDate','TR.DivExDate',
                    'TR.DivPayDate','TR.DivPeriodEndDate',
                    'TR.DivAdjustedGross'],
            {'EDate':'-1AW', 'SDate':'2013-01-01'})
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.

Thanks a lot, Alex! It works

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.