Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 2 6

Eikon API R NOT WORKING

get_timeseries(rics = ricsH,
               fields = list("TIMESTAMP", "CLOSE"),
               start_date = paste(SoyaFC$Date[nrow(SoyaFC)] + 1, "T00:00:00", sep = ""),
               end_date = paste((today() - 1), "T00:00:00", sep = ""),
               interval = "daily",
               normalize = TRUE,
               raw_output = TRUE)

Two weeks back I was able to run this code with no issue. Now it is giving me weird output that I can't make sense of and I can't convert it from JSON to text.

I'm getting the following error:

Error: lexical error: invalid char in json text.
                                       <!DOCTYPE HTML PUBLIC "-//W3C//
                     (right here) ------^


What might the issue be?

eikonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apierrortime-serieseikon-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.

Hello @devilliersk ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@devilliersk

One scenario that can trigger this issue is the current Eikon user is used somewhere else.

For example, while using Eikon Data API on the desktop, I use the same Eikon user to log in to the Refinitiv Workspace Web.

After re-running the code, I got the following error.

Error: lexical error: invalid char in json text.
                                       <!DOCTYPE HTML PUBLIC "-//W3C//
                     (right here) ------^


Traceback:


1. eikonapir::get_timeseries(rics, fields = query_fields, start_date = "2020-01-01T00:00:00", 
 .     end_date = "2020-11-01T00:00:00", interval = "daily")
2. jsonlite::fromJSON(json_data)
3. parse_and_simplify(txt = txt, simplifyVector = simplifyVector, 
 .     simplifyDataFrame = simplifyDataFrame, simplifyMatrix = simplifyMatrix, 
 .     flatten = flatten, ...)
4. parseJSON(txt, bigint_as_char)
5. parse_string(txt, bigint_as_char)

If you check the raw output, it returns the sign-in HTML page.

1627895821352.png

I need to re-login to Eikon to make the application work again.




1627895821352.png (57.5 KiB)
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.