I'm trying to automate some of our queries, which are mostly on indicators like GDP growth. I can get this data in Excel, as well as the stand-alone Eikon App, but because I am most familiar with Python, I would like to download it with Python. I found these as instruments in Data Item Browser, but did not finde any Data Items under them. Is there a way to request this data with the Python API? If not, which API can I use? TIA
You can use the same field names you use in =RtGet or =TR function in Excel. E.g. if you're using =TR("USGDPF=ECI","GN_TXT16_4") to retrieve the latest actual reported US GDP growth into Excel, you can use ek.get_data(['USGDPF=ECI'],['GN_TXT16_4']) in Python to retrieve the same data as a pandas dataframe.
Economic indicator RICs starting with a small 'a' are historical only RICs. There's no quote for these RICs on the real-time datastream, you can only retrieve timeseries for these instruments using get_timeseries method, which given the error message you received I figure is what you're already trying to do. There are two issues here. One is a bug in Eikon Python library, which results in incorrect handling of mixed case RICs (such as the ones starting with small 'a') when those RICs are provided to get_timeseries method as strings. This bug is the reason for the error message you received. The bug will be fixed in the production release of Eikon Python library. In the meantime the workaround is to always use list in the first argument of get_timeseries method. The second issue is that the default value for interval parameter of get_timeseries method is 'daily'. Most economic indicators are not updated on a daily basis and for most economic indicator RICs starting with small 'a' daily interval does not exist in the timeseries database. You need to make sure you use appropriate interval value for the RIC in get_timeseries method. Here's an example: