I'm trying to get historical data for fx swaps in jupyter notebook (date, close , days_maturity). ek.get_timeseries only seems to show OHLC and volume.
I'm not quite sure on how to use the ek.get_date.
sd = "2020-06-01"
ed = "2020-06-05"
I am not Eikon Excel expert, but I can confirm that the "DAYS_MAT" and "MID_PRICE" fields that are exposed to Eikon Data API(Python) do not support timeseries.
However, I found these fields (I was hoping that Refinitiv Content Helpdesk would be able to give you these fields)
To use get_data() function, you can refer to "Data Item Browser" which lists all fields and their parameters that you can set in this function.
Please refer to Using DIB as Reference section in this tutorial for more details of "Data Item Browser"
These fields (['CF_DATE','CF_Last',"DAYS_MAT"], ) are from a Realtime database, so they do not support SDate, EDate, and historical data retrieval.
I tried to locate the close, date, and days_maturity using "Data Item Browser" but I could not locate them. (I am not a content expert)
You can try using "Data Item Browser" following this tutorial.
Or you can contact Refinitiv Content Helpdesk to clarify if there are any fields carrying the information you are looking for.
I do have a quick question here.
From the data you can retrieve:
Can you calculate the data you need following this code:
df1,e = ek.get_data('JPY1M=','MATUR_DATE') df1 df2 = ek.get_timeseries('JPY1M=', fields='Close', start_date='2020-06-01', end_date='2020-06-05') df2 import datetime date_time_obj = datetime.datetime.strptime(df1['MATUR_DATE'], '%Y-%m-%d') date_time_obj df2['days_maturity'] = date_time_obj- df2.index df2