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
Best Answer
-
@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] 3I 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.0
Answers
-
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.
0 -
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?
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 33 Data Model Discovery
- 682 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.8K Refinitiv Data Platform
- 622 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 84 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛