I am trying to retrieve historical Book Value per Share using the Refinitiv Eikon API. Apart from the value, I would also like to output the date corresponding to the value.
I am currently able to output the values:
import eikon as ek
ek.set_app_key(my_api)
ric = 'MSFT.O'
params = {'SDate':'1999-12-31',
'EDate' :'2021-03-01',
'Period': 'FQ0',
'Frq':'FQ',
'reportingState':'Rsdt',
'curn':'Native',
'Scale':'3'}
df = ek.get_data(ric, 'TR.BookValuePerShare', parameters=params)
This will output the time-series but it will be indexed by integers.
I can use the Data Item Browser to see that in the parameters I could specify output Date as well as Value. to
However, if I simply try:
params = {'SDate':'1999-12-31',
'EDate' :'2021-03-01',
'Period': 'FQ0',
'Frq':'FQ',
'reportingState':'Rsdt',
'curn':'Native',
'Scale':'3',
'Output': 'Date',
}
This will give me an error message:
( 0 TR.BOOKVALUEPERSHARE
0 MSFT.O <NA>,
[{'code': 405,
'col': 1,
'message': "Invalid output format: neither 'Col' nor 'Row' parameter is specified before output colums/rows.",
'row': 0}])
What are these Row and Col objects? How can I output other fields as well as value?