Requesting HistoricalPricing.Summaries does not work for RICs containing "/" when using Eikon

When requesting RICs that contain "/" characters e.g. "aUSCCORYE/A" the result is a "404 page not found" error. This works using Workspace but does not work when using Eikon (4.0.64012)
I Modified Example "2.1.01-HistoricalPricing-Summaries" to reproduce this:
var response = Summaries.Definition("aUSCCORYE/A")
.Interval(Summaries.Interval.P3M)
.GetDataAsync().Result;
The RDP.log shows encoded instrument name
Method: GET, RequestUri: 'http://localhost:9060/api/rdp/data/historical-pricing/v1/views/interday-summaries/aUSCCORYE/A?interval=P3M'
Tested with "Refinitiv.Data Library beta 5" for .net.
Best Answer
-
@martin.grunwald Thanks for your question and sorry to hear about your issue. It is infact an escaping issue as the historical pricing endpoint is being hit which is a URL with some querystring parameters - obviously such rics with a / character are not being interpreted correctly so we need to use the escaped charset for the / which is %2F - please see the following
rd.get_history("aUSCCORYE%2FA")
I hope this can help.
0
Answers
-
This obviously raises the question, how can I find out whether the RDP library is connected via Workspace or Eikon?
0 -
I just tested against my Desktop Session using the following
response = Summaries.Definition("aUSCCORYE/A").Interval(Summaries.Interval.P3M)
.GetData();And received the following response:
I reported this to the desktop team awhile back and based on what I can now see, the fix is in. However, the fix may have been applicable only to the Workspace proxy. I will confirm.The Data Library does not distinguish between desktop connections into Workspace vs Eikon. It comes down to what you are running. I assume you are running Eikon given your original post.
0 -
For now I implemented a workaround where I always try the encoded version in case the non encoded version failed.0 -
Hello @martin.grunwald
I have created a console app using .NET Framework 4.8 and called the same instrument with the same parameters in the example above. Here is the endpoint URL right before the call is made by the library to retrieve the data:
I can see that "/A" becomes "%2FA" in the request URL, just like in Jason's example above. The call is made successfully to the backend (HTTP Status 200).
Throughout this exercise, I am running the Refinitiv Workspace.
0 -
I am running out of ideas where the difference could be. The last idea was the custom web socket handler installed via RegisterWebSocketImpl, but it is pretty much exactly the same as the default implementation (plus some code to make it thread safe). Unless I am expected to encode the json passed in via IWebSocket.SendAsync, which does not seem to make sense to me and is not done in the default implementation either.
0 -
Hello @martin.grunwald
Please confirm what desktop product are you using ? Is it Eikon or Refinitiv Workspace ?
Please send the logs where the issue is occurring with debug turned on.
0 -
I reproduced the issue using "Workspace" and "Eikon". Attached log shows requesting the RIC "aUSCCORYE/A" for multiple intervals (only P1M is expected to succeed). After that the same requests are made using a pre encoded version "aUSCCORYE%2FA". Line 946 contains the succeeding call: Method: GET, RequestUri: 'http://localhost:9060/api/rdp/data/historical-pricing/v1/views/interday-summaries/aUSCCORYE%252FA?fields=DATE,VALUE&interval=P1M&count=10000&sessions=normal', Version: 1.1, Content: <null>, Headers:
This specific test was run using RDP beta 5 using Eikon
RDP_.zip0 -
The same process as above using workspace RDP_WSP.zip
0 -
Hi @martin.grunwald,
Thanks for the logs.
In short, I was unable to replicate the issue you found. To make sure we're on the same page, I created a brand new .Net 4.8 project. I'm testing with Refinitiv Workspace, however, I don't think the issue is related to the session but rather the failing of escaping the embedded slash (/).
For example, here is my .Net 4.8 code:var response = Events.Definition().Universe("aUSCCORYE/A")
.Count(10)
.EventTypes(Events.EventType.quote, Events.EventType.trade)
.GetData();Before the request is sent into the backend, this is what my URL looks like in the logs:
http://localhost:9001/api/rdp/data/historical-pricing/v1/views/events/aUSCCORYE%2FA?count=10&eventTypes=quote%2Ctrade
In preparation for this URL, the actual code that is escaping the slash looks like this:
var result = System.Uri.EscapeDataString("aUSCCORYE/A"); // Returns: aUSCCORYE%2FA
Comparing our logs, we're both using the same version:
Me:2023-10-26 10:50:14.8368|Info|Refinitiv.Data.Initializer|1|Library version: 1.0.0-beta5
2023-10-26 10:50:14.8368|Info|Refinitiv.Data.Initializer|1|.Net runtime: 4.0.30319.42000
2023-10-26 10:50:14.8368|Info|Refinitiv.Data.Initializer|1|.Net version: 4.8.4645.0You:
2023-10-25T17:48:44InfoRefinitiv.Data.InitializerLibrary version: 1.0.0-beta5
2023-10-25T17:48:44InfoRefinitiv.Data.Initializer.Net runtime: 4.0.30319.42000
2023-10-25T17:48:44InfoRefinitiv.Data.Initializer.Net version: 4.8.9181.0The only thing I can suggest you try is the above code segment that escapes the (/) just to make sure it responds as expected - you should be getting the slash properly expanded. Please confirm.
You do have a workaround and you should be able to do something like this:var response = Events.Definition().Universe(System.Uri.EscapeDataString("aUSCCORYE/A"))
.Count(10)
.EventTypes(Events.EventType.quote, Events.EventType.trade)
.GetData();One this that is confusing to me is when you explicitly request for "aUSCCORYE%2FA", it properly expands within the logs! That is:
http://localhost:9001/api/rdp/data/historical-pricing/v1/views/interday-summaries/aUSCCORYE%252FA?interval=P1D&count=10&sessions=normal'
%2FA successfully expands to %252FA! Yet "/" didn't expand.
0 -
I also find this "double encoding" confusing. I think it is not a language setting. I am running windows using the german local, but I don't see how the "/" would make a difference.
The System.Uri.EscapeDataString() suggestions is the fallback I am currently using.
0 -
Hi @martin.grunwald,
Just to confirm, if you were to inject this line of code within your application, what returns:
var result = System.Uri.EscapeDataString("aUSCCORYE/A");
0 -
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 689 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 24 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 711 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛