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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 1 1 4

RHistory Excel - Receive multiple Instruments without redundant TIMESTAMP

I'm currently working with the Thomson Reuters Excel Add-In to fetch data using the TRHistory function.

=RHistory("EUR=;EURPLN=","BID.Timestamp;BID.Close";"START:cell_ref END:cell_ref Interval:1D",,"Sort:ASC CH:In;FD DAY:A NULL:NA", B4)

This code does indeed receive the data, but unfortunately adds TIMESTAMP columns for every single instrument (in this case "EUR=", "EURPLN="). I'm required to fetch the data in the following format:

DATA       EUR= EURPLN= ...01.01.2018 ...  ...     ...

Dates with missing data in any of the instruments may be skipped or "NA" as data would be fine as well. My current approach was to use the "RHistory" function two times - once to receive the dates, another to download the actual data.

Sadly the approach fails, since it's not possible to receive the data excluding the TIMESTAMP field.

You must specify the TIMESTAMP field when you specify NULL for interday intervals.

How can I change my approach to get the desired outcome?

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apieikon-com-apiexceltime-stamp
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.

1 Answer

Upvotes
Accepted
4.6k 26 7 22

@e209120f-b953-40e3-b871-df76718a1c1f there is something not right with your sample request, as in, I do not recognize the field names.

You can use a 'TSREPEAT:NO" not to repeat the timestamp column. Here is the function:

=RHistory("EUR=;EURPLN=","BID.Timestamp;BID.Close","INTERVAL:1D",,"TSREPEAT:NO Sort:ASC CH:In;FD DAY:A NULL:NA")

DAY:A shows all days including the weekend. Are you sure that you need that as well?

In future, it is better if you address the questions not related to the API functionality to your local product support desk.


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.

Thank you for the support. I fixed the field names to not further confuse future readers.