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

Get historical shares outstanding include date

I am using the following api call


df, err = ek.get_data(
    instruments = ['MSFT.O'],
    fields = ['TR.SharesOutstanding'],
    parameters = {'Frq' : 'D','SDate': '2020-05-01', 'EDate' : '2020-08-25','CH' : 'Fd','RH' : 'date'}
)


I am getting data in the following manner:

   Instrument  Outstanding Shares
0      MSFT.O          7583440247
1      MSFT.O          7583440247
2      MSFT.O          7583440247
3      MSFT.O          7583440247
4      MSFT.O          7583440247
..        ...                 ...
76     MSFT.O          7567652935
77     MSFT.O          7567652935
78     MSFT.O          7567652935
79     MSFT.O          7567652935
80     MSFT.O          7567652935


This is very hard to work with as I don't know the date, it needs a date column as well so I can match the index up. How can I add a date column

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.

Not a refinitiv employee, but have you tried


df, err = ek.get_data(instruments = ['MSFT.O'],

fields = ['TR.SharesOutstanding', 'TR.SharesOutstanding.Date'],

parameters = {'Frq' : 'D','SDate': '2020-05-01', 'EDate' : '2020-08-25','CH' : 'Fd','RH' : 'date'})

Thanks that works!

1 Answer

· Write an Answer
Upvote
Accepted
242 3 4 2

Not a refinitiv employee, but have you tried

df, err = ek.get_data(instruments = ['MSFT.O'],
fields = ['TR.SharesOutstanding', 'TR.SharesOutstanding.Date'],
parameters = {'Frq' : 'D','SDate': '2020-05-01', 'EDate' : '2020-08-25','CH' : 'Fd','RH' : 'date'})
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.

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.