For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
79 3 6 7

How to exclude pre and post market qoutes in get_timeseries request

Hello! Is there any method to exclude pre and post market trades in get_timeseries request? It's about intervals less than daily:

In Eikon it's avaliable in chart properties with disabling checkbox parameter:

Raw code:

rics = ['NEE']
fields = ['TIMESTAMP', 'OPEN', 'HIGH', 'LOW', 'CLOSE', 'COUNT', 'VOLUME']
params = {'start_date': '2018-11-28', 'interval': 'hour'}
quotes = ek.get_timeseries(rics=rics, fields=fields, **params)
quotes

Thanks!

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonpost
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
79 3 6 7

@Zhenya Kovalyov Thank you for your reply! But I think this method incorrect works when Europe and US changing their local time (with one week lag one from another).

I tryed parameter 'calendar' in method get_timeseries with value 'tradingdays'. It looks like it works:


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
4.6k 26 7 22

@oalexandere the time series API does not support this out of the box, however, you can use pandas functionality to get only hours that your are interested in.

df = ek.get_timeseries('NEE', start_date='2018-11-28', interval='hour')
df.between_time('15:00', '22:00').head(10)

Let me know if this works for you.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

It is unfortunate that such functionality is not supported, it would reduce the server load on Refinitiv's side. Same with the big gap between 1h and 1min intraday data. If you need 30min intraday data you are forced to load 1 minute data and dispose 96% of the data... How efficient is that?

Click below to post an Idea Post Idea