Data Library for .NET not working for RDP API company fundamentals
The client is using the Data Library for .NET (or RD Library for .NET). Please advise on the below query they are facing when trying to access the Company Snapshot and Pricing Streaming using the Data Library for .NET.
It includes the Refinitiv.Data.Content.Data.FundamentalAndReference request. However, using this request always fails producing
"""HTTPStatusCode"": 403","",Property,True,HTTPStatusCode
"""HTTPReason"": ""Forbidden""","",Property,True,HTTPReason
"""Contents"": {
""error"": {
""id"": ""78280294-0515-4a3d-813e-dd370f06bcf4"",
""code"": ""insufficient_scope"",
""message"": ""access denied. Scopes required to access the resource: [trapi.data.get.data.read]. Missing scopes: [trapi.data.get.data.read]"",
""status"": ""Forbidden""
For our application, the only way to get the Fundamentals is to use the Refinitiv.Data.Delivery.Request which is basically a wrapped https request, which we would prefer to avoid.
It is difficult to understand why an lendpoint request would work while the library request would not.
Also the endpoint requests seem to have the limitations regarding the programmatic universe or fields specifications using BodyParameters.
The is equally an issue is the availability of the request for the estimates and financial statements using the RD Library for .NET.
It looks like there is simply no namespace for these requests.
Does it mean that the only way is to perform the endpoint requests?
For <user-id1>, the specified endpoints work, however the problem with Library’s Refinitiv.Data.Content.Data.FundamentalAndReference interface
persists (the Refinitiv.Data.Content.Data.FundamentalAndReference fails while Refinitiv.Data.Delivery.Request.EndpointRequest works)
I am attaching the relevant part of the log, as you requested.
The other relevant information:
- The snippet source code that encounters the problem =>
var resp2 = Refinitiv.Data.Content.Data.FundamentalAndReference.Definition(some valid RIC).Fields("TR.Price52WeekHigh", "TR.Price52WeekHighDate").GetData(); - Visual Studio and .NET versions => Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.9., .Net 6.0
- Which session are you using? (The Desktop session or RDP session) => RDP (Platform) session
- Log => attachedFundmentalsRequestWithError.txt
==============
Other issues:
- Passwords:
there is a very annoying issue with the <user-id2> account. The password contains an amp character (&) which is a restricted character in the XML.
As we use the xml config files, this causes the problem.
So unless you know how to escape this char in XML, can you please change the password so the restricted chars are not being used, pls?
Note that & does not work as the escape char.
Best Answer
-
Hi @bindia.nair
I want to confirm the specific issue. You are using a Platform Session and connecting into RDP and when you use the delivery layer you are not getting a permission issue. For example:
const string dataGridEndpoint = "https://api.refinitiv.com/data/datagrid/beta1/";
using ISession session = Sessions.GetSession(); // Will connect to a Platform Session
if (session.Open() == Session.State.Opened)
{
var definition = EndpointRequest.Definition(dataGridEndpoint).Method(EndpointRequest.Method.POST);
// Simple request
var response = definition.BodyParameters(new JObject()
{
{"universe", new JArray("IBM.N") },
{"fields", new JArray("TR.Price52WeekHigh", "TR.Price52WeekHighDate") }
}).GetData();And when you do the same thing from the Content layer:
using Refinitiv.Data.Content.Data;
...
// Create a session into the platform
var session = Sessions.GetSession();
session.Open();
var response = FundamentalAndReference.Definition("IBM.N")
.Fields("TR.Price52WeekHigh", "TR.Price52WeekHighDate").GetData();You get a permission error?
Here are the scenarios where this can occur:
- Using a DesktopSession when using the Delivery layer and PlatformSession when using the Content Layer
- Using different Platform Sessions using different credentials.
- The RDP endpoint version has been updated and you are using a newer version. I just checked and the library is using the most recent version
The best way to demonstrate such behavior is to turn on debugging and create a sample example demonstrating this. The Content layer is using the Delivery layer so we should see how the calling sequence is going out on the wire for both tests.
0
Answers
-
Hello @bindia.nair
About the password reset question, the client can ask their LSEG representative to change the password for them, or alternatively use the RDP /auth/oauth2/v1/token endpoint with newPassword parameter to reset the password.
HTTP Request:
POST /auth/oauth2/v1/token HTTP/1.1
Host: api.refinitiv.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 201
username=<user-id or machine-id>&password=<Old Password>&grant_type=password&scope=trapi&takeExclusiveSignOnControl=true&client_id=<App Key>&newPassword=<New Password>0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛