Hi,
I'm trying to get historical options data but unable to get timestamps when I run the query below, I tried a few different fields instead of "CF_DATE" but none of them worked, 'Rh': 'date' parameter also doesn't seem to do anything. What is the right way to make this query?
e = dt.datetime(2020, 1, 17) df_opt, err = ek.get_data('SPXm172029000.U', ['CF_DATE', 'TR.BIDPRICE', 'TR.ASKPRICE', 'TR.IMPLIEDVOLATILITYOFBIDPRICE', 'TR.IMPLIEDVOLATILITYOFASKPRICE'], {'Rh': 'date', 'SDate': '{:%Y%m%d}'.format(e - dt.timedelta(days=365)), 'EDate': '{:%Y%m%d}'.format(e)})
I also tried get_timeseries query, but that doesn't like the ric and returns the error below.
df_opt, err = ek.get_timeseries( [ric], ['STRIKE_PRC', 'AQ_ASK', 'AQ_BID', 'BID', 'ASK', 'EXPIR_DATE', 'PUTCALLIND'], start_date=start_dt, end_date=end_dt)
Error with SPXm172029000.U: Invalid RIC SPXm172029000.U: Invalid RIC | Traceback (most recent call last): File "C:\Users\Eren\source\.venv\meleti\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-44-cbda5db7f2c9>", line 3, in <module> start_date=start_dt, end_date=end_dt) File "C:\Users\Eren\source\.venv\meleti\lib\site-packages\eikon\time_series.py", line 197, in get_timeseries raise EikonError(-1, message=ts_error_messages) eikon.eikonError.EikonError: Error code -1 | SPXm172029000.U: Invalid RIC |
Thanks,
E