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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 0

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

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

Upvote
Accepted
242 1 3 1

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea