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.

1 Answer

· Write an Answer
Upvotes
Accepted
80k 257 52 75

@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.