TRDPRC_1.Close Need historical data at a specific time of the day
Can you please suggest a script in Eikon Python API that can capture 1 Min Interval at a specific time of the day for multiple dates?
The Eikon Excel formula we are using is,
=RHistory(B$3,"TRDPRC_1.Close","START:"&$A4+$D$1&" NBROWS:1 INTERVAL:1M",,"TSREPEAT:NO SORT:ASC")
where B3 is FXXPZ2
A4 is October 19, 2022
D1 is 18:00
Find more posts tagged with
Hi @kenley.macandog123 ,
You could do the resampling:
df = ek.get_timeseries('TRI.N', 'CLOSE', interval='hour')
df1 = df.iloc[lambda df: df.index.hour == 18,:]
But you can only get the timeseries going back as far as the hourly history goes, which is about 3 months.
I Hope this helps and please let me know in case you have any questions
Hi @kenley.macandog123 ,
You could do the resampling:
df = ek.get_timeseries('TRI.N', 'CLOSE', interval='hour')
df1 = df.iloc[lambda df: df.index.hour == 18,:]
But you can only get the timeseries going back as far as the hourly history goes, which is about 3 months.
I Hope this helps and please let me know in case you have any questions
Hi @kenley.macandog123 ,
Is this what you're looking for? end_date can be added to specified the specific data period
Plus, to check the available parameters of the function, you may use
Hope this helps and please let me know in case you have any further questions.
@raksina.samasiri
Thank you for the info above.
Is there a script you know that can pull up one entry on a daily basis?
I know the script above and it pulls up the data based on a time range. I need to know if it's possible to get one value at 18:00 on a daily basis. I also need to use the specific data item TRDPRC_1.Close
Appreciate the assistance.