I am attempting to download some data using the Eikon python package (version == 1.1.2 due to some issues with more recent versions), however it is very hit or miss whether I actually receive a response from the Eikon servers. Very frequently I get the 400 error (bad request) and when I do receive a response frequently many, if not all, the values in my resulting dataframe are "na". Is there anything I can do to ensure I receive prompt and complete data?
Code to Reproduce:
import eikon as ek
ek.set_app_key("YOUR KEY HERE")
for years_back in range(25): year = str(2020 - years_back) print(year) s, e = 365 * years_back, 365 * years_back + 1 data, err = ek.get_data(tickers, fields=['AVG(TR.PriceToSalesPerShare(SDate=-{s},EDate=-{e},Frq=D))'.format(s=s, e=e), 'AVG(TR.CompanyMarketCap(Curn=USD,SDate=-{s},EDate=-{e},Frq=D))'.format(s=s, e=e), 'AVG(TR.DailyValueTraded(Curn=USD, SDate=-{s},EDate=-{e},Frq=D))'.format(s=s, e=e), 'TR.CoRPrimaryCountry'])
Environment:
conda version : 4.8.4
pip: 20.2.2
platform : win-64
eikon: 1.1.2
pandas: 1.1.1