Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by claudiu · Feb 16, 2019 at 04:31 PM · eikonworkspacepythonworkspace-data-apirefinitiv-dataplatform-eikonricsreikon-data-api-r

get_symbology exists with error instead of silently

I have a loop going through a list of ISIN/SEDOL names I want converted to RICs. Once it encounters an ISIN it deems invalid I get an error as below and the loop exists.

Error in print.default("HTTP Error, code= ", response$status_code, sep = "") : 
  invalid 'digits' argument 

I tried using a try clause with the silent option on but the get_symbology stops working after the first fail and the following code gives me NAs for all calls after the first error. If I do the calls one by one for each ISIN the commands work properly but I have a long list and want the loop to work.

RIC_vec <- vector("character",length = N)
for (i in 1:N) {
  RIC_ID <- try(get_symbology(comps[i,2][[1]],
                          from_symbol_type = "ISIN",
                          to_symbol_type = "RIC"),silent=T)
  print(i)
  if ("RIC" %in% names(RIC_ID)) {
    RIC_vec[i] <- RIC_ID[1,2]} 
  else {
    RIC_vec[i] <- NA}
} 

I'm using the eikonapir package in R.

Thanks,

Claudiu

People who like this

0 Show 1
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Jirapongse ♦♦ · Feb 20, 2019 at 01:15 AM 0
Share

@claudiu

From the problem statement, you got the error when calling the get_symbology function with a list of ISIN symbols. However, it works fine if it is called one by one.

Please share a list of symbols used by the application and let me know how many symbols in each request.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov.1 · Feb 20, 2019 at 06:58 PM

@claudiu
In order to understand what's going on here we need a way of reproducing the issue on our end. Would you be able to provide a complete sample code that reliably recreates the issue for you and that we could run to reproduce it? I just tried to simulate the issue by including an invalid ISIN in the character vector and running the code below.

> isins = c("US0378331005","akuebfkn","FR0000121501")
> for (i in 1:3) {
+     print(isins[i])
+     RIC <- try(get_symbology(isins[i],
+         from_symbol_type = "ISIN",to_symbol_type = "RIC"),silent=T)
+     print(i)
+     print(RIC)
+ }

The code ran gracefully as expected and produced the following output

[1] "US0378331005"
[1] 1
        Symbol    RIC
1 US0378331005 AAPL.O
[1] "akuebfkn"
[1] 2
    Symbol                   error
1 akuebfkn No best match available
[1] "FR0000121501"
[1] 3

I also tried to replicate the issue you describe by forcing get_symbology method to return an error. For this purpose I used invalid app key in set_app_id method. Again I couldn't reproduce the behavior you describe. In this test case every get_symbology call failed, but the loop ran all the way through thanks to try function.
It might be helpful to print the try-error object to understand what happens on your end.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by claudiu · Feb 20, 2019 at 08:51 AM

To clarify, the error is for calling get_symbology with one ISIN item only. It is done in a loop, see code example above, each time with single ISIN. The error fails at different times during the loop if run several times so it may be a connectivity or response from server issue. The ISINs are OK since I manage to call get_symbology directly (not in loop) on the "failed" ISIN and get a correct answer. The question is if this is some server related issue how to workaround it and why doesn't the get_symbology command fail gracefully instead of exiting the program?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

how to use eikonapi fetching Bond data in R?

How to find the appropriate fields for US1YT=RR ?

Error when accessing Eikon data via API using R

eikonapir setting without need for API proxy

Received invalid 'digits' argument when using EIKON API R to pull data

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges