New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
104 8 10 13

Eikon API timeseries time field in start and end date string

Is the time in the start_date and end_date parameter of the get_timeseries command used or do we only get end of day info? If intra-day info is available what time zone is the time defined in and what would we get for CLOSE field for example?

I played a bit with the numbers after the T delimiter in the command below and did not get any change in the retrieved info, the response always came back for T00:00:00.

> get_timeseries('IBM','*',start_date = '2017-03-21T17:00:00',end_date='2017-03-31T23:00:00','weekly')

TIMESTAMP HIGH CLOSE LOW OPEN COUNT VOLUME NA

1 2017-03-24T00:00:00Z 176.23 173.83 172.8 175.65 156607 16816029 IBM

2 2017-03-31T00:00:00Z 175 174.14 172.0937 172.69 130766 15950463 IBM

Any way to just get the date instead of the timestamp and "Security" instead of NA to reduce data formatting steps?

Thanks,

Claudiu

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apitime-seriesreikon-data-api-r
icon clock
10 |1500

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

forgot to mention, using eikonapir package in R

Upvotes
Accepted
11.1k 22 6 9

Hi @claudiu thanks for your reply - I will check this - I can replicate your issue. One thing I would say is the the times are GMT so for a US stock you might need to take that into consideration. I think the request that generates the 1980-03-xx response is just plain wrong - your request errors when I hit the service directly as it should because you are requesting 1 hours data during a period that the market is not open - hence you should expect an error or no data available type message - it seems to be a problem with the way the R wrapper is handling this. I will check with @ahmed.mohammed and @iain.scott

icon clock
10 |1500

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

Upvotes
11.1k 22 6 9

Hi @claudiu The interval you are requesting is Weekly (which is essentially Interday - rather than Intraday) - so a weekly close couldn't vary by hour say. If you want intraday timeseries you can request any intraday frequency eg hourly (we carry Tick, Minute & Hour) closes and then perhaps aggregate using a dataframe function. I wrote a sample in python demonstrating this using some of the re-sampling features in pandas to turn an hourly timeseries into a fourhour tiemseries. You can see that here. I'm certain R has similar.

I don't think we would change the generic format of the Timestamp as it needs to serve generically (including say Tick use cases which require that time resolution) - but you should easily be able to write a function which truncates that for you eg get intraday prices which includes the time portion or get interday prices which does not. Or perhaps put in a request at the github site for the R wrapper.

I hope this can help.

icon clock
10 |1500

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

Upvotes
104 8 10 13

Thanks @jason.ramchandani. The truncation is easy, was just looking for convenience as this data is not needed for interday retrievals, no big issue. For interday data (daily,weekly..) all the fields retrieved are identical with no regard to the timestamp. I did see in your python example that you're able to get away just with the date.

My query is that there seems to be a problem with both the intraday and interday timestamp implementation. For interday I ran a daily query in 2 modes which gave me an additional entry I don't understand:

> get_timeseries('IBM','*',start_date = '2017-03-21T01:00:00',end_date='2017-03-24T00:00:00','daily')

TIMESTAMP HIGH CLOSE LOW OPEN COUNT VOLUME NA

1 2017-03-22T00:00:00Z 175.06 174.78 172.8 174.04 31964 3450512 IBM

2 2017-03-23T00:00:00Z 175.67 174.82 173.56 174.43 29954 3739976 IBM

3 2017-03-24T00:00:00Z 175.5 173.83 173.39 175.12 28724 3221675 IBM

> get_timeseries('IBM','*',start_date = '2017-03-21T00:00:00',end_date='2017-03-24T00:00:00','daily')

TIMESTAMP HIGH CLOSE LOW OPEN COUNT VOLUME NA

1 2017-03-21T00:00:00Z 176.23 173.88 173.84 176.01 41325 3927741 IBM

2 2017-03-22T00:00:00Z 175.06 174.78 172.8 174.04 31964 3450512 IBM

3 2017-03-23T00:00:00Z 175.67 174.82 173.56 174.43 29954 3739976 IBM

4 2017-03-24T00:00:00Z 175.5 173.83 173.39 175.12 28724 3221675 IBM

For intraday, for hourly and ticker data I get dates outside of the start-end date interval (the full result is a few thousand lines):

> get_timeseries('IBM','*',start_date = '2017-03-21T00:00:00',end_date='2017-03-21T01:00:00',interval='hour')

TIMESTAMP HIGH CLOSE LOW OPEN COUNT VOLUME NA

1 1980-03-17T00:00:00Z 15.09375 14.78125 14.78125 <NA> <NA> 1658800 IBM

2 1980-03-18T00:00:00Z 15.0625 14.90625 14.65625 <NA> <NA> 1974400 IBM

> get_timeseries('IBM','*',start_date = '2017-03-21T00:00:00',end_date='2017-03-21T01:00:00','hour')

TIMESTAMP HIGH CLOSE LOW OPEN COUNT VOLUME NA

1 1980-03-17T00:00:00Z 15.09375 14.78125 14.78125 <NA> <NA> 1658800 IBM

2 1980-03-18T00:00:00Z 15.0625 14.90625 14.65625 <NA> <NA> 1974400 IBM

3 1980-03-19T00:00:00Z 14.9375 14.71875 14.6875 <NA> <NA> 1474000 IBM

icon clock
10 |1500

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

Upvotes
11.1k 22 6 9

Hi @claudiu also the following response seems to work correctly:

df = get_timeseries('IBM','*',start_date = '2017-03-21T00:00:00Z',end_date='2017-03-21T16:00:00Z',interval='hour')

> print(df)

TIMESTAMP HIGH LOW OPEN CLOSE COUNT VOLUME NA

1 2017-03-21T14:00:00Z 176.23 175.38 176.01 175.55 1717 342593 IBM

2 2017-03-21T15:00:00Z 175.71 174.5 175.569 174.63 3715 595474 IBM

3 2017-03-21T16:00:00Z 174.73 173.85 174.675 174.595 3427 595486 IBM

I expected this response as the US market opens in the GMT early afternoon - so the hours between 00:00:00 and 14:00:00 will not be populated

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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