3 requests:
1. ek.get_data('0#IPC:', ['RECORDTYPE'], '')
2019-03-15 16:45:14,189 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'DataGrid', 'W': {'instruments': ['0#IPC:'], 'fields': [{'name': 'RECORDTYPE'}]}}, 'ID': '123'}
2019-03-15 16:45:15,220 -- pyeikon -- DEBUG -- HTTP Response code: 200
2019-03-15 16:45:15,220 -- pyeikon -- DEBUG -- HTTP Response: {"columnHeadersCount":1,"data":[["/IPCM9",114],["/IPCU9",114],["/IPCZ9",114],["/IPCH0",null]],"error":[{"code":251658243,"col":1,"message":"'The record could not be found' for the instrument '/IPCH0'","row":3}],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"RECORDTYPE","field":"RECORDTYPE"}]],"rowHeadersCount":1,"totalColumnsCount":2,"totalRowsCount":5}
The program skipped /IPCH0 as invalid ticker
2. ek.get_data('0#IPC:', ['RECORDTYPE'], '')
2019-03-15 17:07:16,584 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'DataGrid', 'W': {'instruments': ['0#IPC:'], 'fields': [{'name': 'RECORDTYPE'}]}}}
2019-03-15 17:07:17,713 -- pyeikon -- DEBUG -- HTTP Response code: 200
2019-03-15 17:07:17,713 -- pyeikon -- DEBUG -- HTTP Response: {"columnHeadersCount":1,"data":[["/IPCM9",114],["/IPCU9",114],["/IPCZ9",114],["/IPCH0",114]],"headerOrientation":"horizontal","headers":[[{"displayName":"Instrument"},{"displayName":"RECORDTYPE","field":"RECORDTYPE"}]],"rowHeadersCount":1,"totalColumnsCount":2,"totalRowsCount":5}
The program assumed that /IPCH0 is valid ticker.
Next request :
ek.get_timeseries('/IPCH0', ['VOLUME;VALUE','TIMESTAMP'], '2019-03-15T00:00:00', '2019-03-15T00:00:01', 'daily')
2019-03-15 17:08:17,103 -- pyeikon -- DEBUG -- Request:{'Entity': {'E': 'TimeSeries', 'W': {'rics': ['IPCH0'], 'fields': ['VOLUME;OPEN;CLOSE;HIGH;LOW;', 'TIMESTAMP'], 'interval': 'daily', 'startdate': '2019-03-15T00:00:00', 'enddate': '2019-03-15T00:00:01'}}}
2019-03-15 17:08:17,731 -- pyeikon -- DEBUG -- HTTP Response code: 200
2019-03-15 17:08:17,731 -- pyeikon -- DEBUG -- HTTP Response: {"timeseriesData":[{"dataPoints":null,"errorCode":"TSIError","errorMessage":"Error: TSINotPermissioned, ErrorCode: TA-TSINotPermissioned, Fault: TSIError, Description: The user does not have permission for the requested data","ric":"IPCH0","statusCode":"Error"}]}
2019-03-15 17:08:17,731 -- pyeikon -- WARNING -- Error with IPCH0: The user does not have permission for the requested data
2019-03-15 17:08:17,731 -- pyeikon -- ERROR -- IPCH0: The user does not have permission for the requested data |
The program stopped as not-expected error come.
3. The same steps as in #2, but in the second request we get expected result:
>>> ek.get_timeseries('/IPCH0', ['VOLUME;VALUE','TIMESTAMP'], '2019-03-15T00:00:00', '2019-03-15T00:00:01', 'daily')
Error with /IPCH0: No data available for the requested date range
/IPCH0: No data available for the requested date range |
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\Python37-32\Lib\site-packages\eikon\time_series.py", line 193, in get_timeseries
raise EikonError(-1, message=ts_error_messages)
eikon.eikonError.EikonError: Error code -1 | /IPCH0: No data available for the requested date range |
As you can see, 3 different results for the same ticker within 30-35 minutes. We handle 1st and 3rd scenarios. But "The user does not have permissions.." for the ticker that we just collected from Chain request looks strange.
Any possible explanation of this behavior ?