RDP get_data error insufficient scope
Hi,
I have a client trying to pull data via RDP API using Python. He is using rd.get_data and is getting the error below. He is able to retrieve data using get_history. Please advise how to fix.
rd.get_data(['/LSEG.L', '/VOD.L'])
No user scope for key=/streaming/pricing/v1/, method=GET.
Insufficient Scope. Cannot load the list of associated URLs from https://api.refinitiv.com/streaming/pricing/v1/ for apis.streaming.pricing.endpoints.main endpoint.
No user scope for key=/streaming/pricing/v1/, method=GET.
Insufficient Scope. Cannot load the list of associated URLs from https://api.refinitiv.com/streaming/pricing/v1/ for apis.streaming.pricing.endpoints.main endpoint.
Traceback (most recent call last):
Cell In[5], line 1
rd.get_data(['/LSEG.L', '/VOD.L'])
File C:\ProgramData\Anaconda3\lib\site-packages\refinitiv\data\_access_layer\get_data_func.py:126 in get_data
raise RDError(-1, except_msg)
RDError: Error code -1 | Error code -1 | Insufficient scope for key=/streaming/pricing/v1/, method=GET.
Required scopes: {'trapi.streaming.pricing.read'}
Available scopes: {'trapi.graphql.subscriber.access', 'trapi.metadata.read', 'trapi.data.symbology.advanced.read', 'trapi.search.explore.read', 'trapi.search.metadata.read', 'trapi.auth.cloud-credentials', 'trapi.cfs.claimcheck.read', 'trapi.search.lookup.read', 'trapi.data.historical-pricing.events.read', 'trapi.data.historical-pricing.summaries.read', 'trapi.data.symbology.read'}
Missing scopes: {'trapi.streaming.pricing.read'}
Best Answer
-
Hi @jasperngo.si ,
Do you know if the user has access to streaming data? The error suggest that the user is not permitted to access to the streaming prices.
Best regards,
Haykaz
0
Answers
-
Hello @jasperngo.si
The Data Library - Python rd.get_data() function calls the RDP https://api.refinitiv.com/streaming/pricing/v1/ in the background for performing the endpoint service discovery.
The error message indicates that the client account does not have permission to access that https://api.refinitiv.com/streaming/pricing/v1/ endpoint because lack of 'trapi.streaming.pricing.read' scope.
I strongly suggest you contact the client's LSEG representative or Account Manager to verify and fix the client permission.
We, Developer Advocate team do not have a permission to set or change the client permission.
0 -
Thanks @aramyan.h and @wasin.w. Based on your answers, looks like client is not connecting to RDP using his Workspace ID. May I know how can user get streaming prices from RDP using his Workspace ID?
0 -
Hello @jasperngo.si
The client can configure the library to use the Desktop Session (Workspace connection) via the refinitiv-data.configuration.json file (the file must be located in an application working directory).
{
"logs": {
"level": "debug",
"transports": {
"console": {
"enabled": false
},
"file": {
"enabled": true,
"name": "refinitiv-data-lib.log"
}
}
},
"sessions": {
"default": "desktop.workspace",
"desktop": {
"workspace": {
"app-key": "<app_key>"
}
}
}
}0 -
Hi @jasperngo.si ,
In addition to what my colleague suggested, I believe, the user may not still be able to get the access to streaming data if the scope 'trapi.streaming.pricing.read' is not assigned to the Workspace ID. So best would be to check also user permissions.
Best regards,
Haykaz
0 -
Thanks @aramyan.h and @wasin.w. This helps a lot.
Is there a way for client to access RDP API using his Workspace ID and permissions without having to login to Workspace everytime he runs the code?
Client has shared his codes below:
import os
os.environ["RD_LIB_CONFIG_PATH"] = "C:/Users/LimRu/Documents/scripts/Example.DataLibrary.Python-main/Configuration"
import refinitiv.data as rd
from refinitiv.data import session
import datetime
rd.open_session(config_name="C:/Users/LimRu/Documents/scripts/Example.DataLibrary.Python-main/Configuration/refinitiv-data.custom.config.json")
rd.get_data(['/LSEG.L', '/VOD.L'])
0 -
Hi @jasperngo.si ,
In order to use the API without having Workspace running on the background the client should connect via platform session (see the details on type of sessions here - Quick Start | Devportal (lseg.com)) which requires Machine ID and password on top of the APP Key. This requires an enterprise license which is something that I believe the Account Manager might help.
Best regards,
Haykaz
0 -
Thanks @aramyan.h
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 中文论坛