Hi all,
I have tried to get values for certain fields by using Eikon Data API. Please find below the code and respective error I got while execution.
Code:
Error:
Could you please let me know where I did wrong ?
Thank You,
Priya
Hi @priyanka
I just tested the API to retrieve fields in your question.
And I could get the data successfully.
I believe that the error is in your integration with MathLab.
By the way, please note that
TR.ClosePrice is from "Time Series Data" databaseTR.InvestorFullName and TR.SharesHeld are from "Ownership" databaseTR.Numshares is from "Period End Ratios" database
So you should be aware that when mixing fields from different databases, the date may not be aligned.
I suggest that you separate the API call for each database.
RIC = 'TWTR.K'fields1 = ['TR.ClosePrice.date','TR.ClosePrice']parameters = {'SDate':'20190406','EDate':'20190806','Frq':'W'}df1,e1 = ek.get_data(RIC,fields1,parameters)df1.head()
fields2 = ['TR.InvestorFullName.date','TR.InvestorFullName', 'TR.SharesHeld.date','TR.SharesHeld']df2,e2 = ek.get_data(RIC,fields2,parameters)df2.head()
fields3 = ['TR.Numshares.calcdate','TR.Numshares']df3,e3 = ek.get_data(RIC,fields3,parameters)df3.head()
@priyanka
Are you using Python 2 and Eikon Data APIs 1.0.2?
Thank You chavalit ! I implemented the same in my code the way you suggested and i can able to retrieve the data.
Yes, Ia m using pyhton 2.7 and Eikon Data API 1.0.2