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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 1

Cannot Match Excel Historical Tick Data Using Python

Hi

I have the following EXCEL query working just fine:

=RHistory("GGAL.BA";"TRDPRC_1.Timestamp;TRDPRC_1.Value;TRDPRC_1.Volume";"START:29-May-2020 END:29-May-2020 INTERVAL:TICK";;"CH:Fd";B2)

Which returns tick history:

Updated at 09:48:04

TimestampLastTrade Volume29/5/2020 17:0793,1515029/5/2020 17:0793,1510029/5/2020 17:0793,1510029/5/2020 17:0793,1550029/5/2020 16:5993,5178629/5/2020 16:5993,5200029/5/2020 16:5993,5140029/5/2020 16:5993,520


I'm not quite sure on how to get the same data in python. I'm using:

>>> df, err = ek.get_timeseries(
...   rics       = ["GGAL.BA"],
...   fields     = ["TRDPRC_1.Timestamp","TRDPRC_1.Value","TRDPRC_1.Volume"],
...   start_date = "2020-05-29",
...   end_date   = "2020-05-29",
...   interval   = "tick"
...   )

The response is:

EikonError: Error code -1 | GGAL.BA: No data available for the requested date range | 

Thank you in advance

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
13k 32 12 18

Your end date is same as start date. Do something like this:

>>> ek.get_timeseries('GGAL.BA', start_date = "2020-05-28", end_date = "2020-05-29", interval = "tick")
GGAL.BA                   VALUE  VOLUME
Date
2020-05-28 14:00:18.086  106.00    15.0
2020-05-28 14:00:18.106  106.00    10.0
2020-05-28 14:00:18.126  106.00    26.0
2020-05-28 14:00:18.156  106.00     6.0
2020-05-28 14:00:18.166  106.00    60.0
2020-05-28 14:00:18.186  106.00     4.0
2020-05-28 14:00:18.196  106.00     2.0
2020-05-28 14:00:18.206  106.00    13.0
2020-05-28 14:00:18.216  106.00     6.0
2020-05-28 14:00:18.226  106.00    11.0
2020-05-28 14:00:18.236  106.00     1.0
2020-05-28 14:00:18.246  106.00    30.0
2020-05-28 14:00:18.256  106.00    15.0
2020-05-28 14:00:18.266  106.00     4.0
2020-05-28 14:00:18.276  106.00    45.0
2020-05-28 14:00:18.286  106.00    13.0
2020-05-28 14:00:18.296  106.00    10.0
2020-05-28 14:00:18.306  106.00    36.0
2020-05-28 14:00:18.316  106.00     1.0
2020-05-28 14:00:18.326  106.00    19.0
2020-05-28 14:00:18.336  106.00    26.0
2020-05-28 14:00:18.346  106.00    20.0
2020-05-28 14:00:18.356  106.00     2.0
2020-05-28 14:00:18.366  106.00    40.0
2020-05-28 14:00:18.376  106.00  1000.0
2020-05-28 14:00:18.386  106.00    20.0
2020-05-28 14:00:18.398  106.00    46.0
2020-05-28 14:00:18.406  106.00    28.0
2020-05-28 14:00:18.416  106.00     1.0
2020-05-28 14:00:18.426  106.00  1000.0
...                         ...     ...
2020-05-28 19:59:06.492  100.20    35.0
2020-05-28 19:59:06.494  100.20   400.0
2020-05-28 19:59:06.502  100.15    31.0
2020-05-28 19:59:06.502  100.10    50.0
2020-05-28 19:59:06.512  100.05   100.0
2020-05-28 19:59:06.514  100.00    40.0
2020-05-28 19:59:06.523  100.00   100.0
2020-05-28 19:59:06.602  100.00   100.0
2020-05-28 19:59:06.612  100.00   244.0
2020-05-28 19:59:14.042  100.20   100.0
2020-05-28 19:59:14.050  100.00   229.0
2020-05-28 19:59:14.502  100.25  1997.0
2020-05-28 19:59:14.510  100.25    25.0
2020-05-28 19:59:14.512  100.25  3000.0
2020-05-28 19:59:14.520  100.30    50.0
2020-05-28 19:59:14.550  100.30  1730.0
2020-05-28 19:59:21.289  100.30    78.0
2020-05-28 19:59:28.217  100.30   490.0
2020-05-28 19:59:28.439  100.25   173.0
2020-05-28 19:59:31.947  100.30    70.0
2020-05-28 19:59:36.789  100.30  2632.0
2020-05-28 19:59:36.797  100.30   700.0
2020-05-28 19:59:39.530  100.30  1668.0
2020-05-28 19:59:39.546  100.30  3000.0
2020-05-28 19:59:39.560  100.30  5332.0
2020-05-28 19:59:50.353  100.35   100.0
2020-05-28 19:59:54.114  100.35   100.0
2020-05-28 19:59:54.123  100.30   900.0
2020-05-28 19:59:57.154  100.55   369.0
2020-05-28 19:59:57.164  100.55  1731.0

[6143 rows x 2 columns]
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.

Great!!!! Just to understand the syntaxis, with "tick" interval:

a) there is no need for "fields" parameters?

b) can not query one single day of data (always must set a range of 2 days)?

Omitting fields will get all the fields in timeseries. Start Date is inclusive, End date is exclusive.

Many thanks!

Upvotes
13k 32 12 18

Hi @jgomez1, Please see answers to similar question here.

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
3 0 0 1

Ok, having read that, am I right to say that RHistory and Eikon API for python may not have this particular data? ¿Is the python code ok to replicate the RHistory query?

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.

Click below to post an Idea Post Idea