Timeseries request with limitations in time

Hi, for the following request, a limitation in time from start time: 15:30 CET, end time:17:30 CET is needed.


import eikon as ek
import datetime
from datetime import time
ek.set_app_key('####YOUR_APP_KEY####')


df = ek.get_timeseries(['ADSGn.DE','AIRG.DE','ALVG.DE','BASFn.DE','BMWG.DE'],
start_date=datetime.timedelta(-90),
end_date=datetime.timedelta(0),
interval='minute')
display(df)


Thanks

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @sschneider ,

    this has been answer in this thread as the below

    as mentioned in this thread that

    get_timeseries method of Eikon Data APIs library always returns timestamps in GMT.

    You may find another way to do the time conversion, in this case, I'm using the time range you used

    df1 = df.iloc[(df.index.time >= datetime.time(14, 30))&(df.index.time <= datetime.time(16, 30))]
    display(df1)

    However, as the data returned is less than latest 90 days due to the Eikon API call limit, you need to call a get_timeseries function in loops with the parts of latest 90 days and then merge the data together.

    1671506924431.png

    Hope this helps and please let me know in case you have any further questions.