Im working on retrieving Refinitiv data using my local Python IDE.
I managed to install the refinitiv module and configure a json file - but some scope is missing:
What is the problem here?
Python code:
import os
import refinitiv.data as rd
os.environ["RD_LIB_CONFIG_PATH"] = "[Local Path]"
rd.open_session()
df = rd.get_data(universe ='EUR=',fields = 'BASE_CCY')
Error message:
Traceback (most recent call last):
File "C:\Users\jesv\AppData\Roaming\JetBrains\PyCharmEdu2022.2\scratches\Refinitiv.py", line 21, in <module>
df = rd.get_data(universe ='EUR=',fields = 'BASE_CCY')
File "C:\Users\jesv\PycharmProjects\pythonProject\lib\site-packages\refinitiv\data\_access_layer\get_data_func.py", line 126, in get_data
raise RDError(-1, except_msg)
refinitiv.data._errors.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.alerts.preferences.crud', 'trapi.alerts.history.crud', 'trapi.data.historical-pricing.summaries.read', 'trapi.synthetic.crud', 'trapi.search.explore.read', 'trapi.user-framework.recently-used.crud', 'trapi.user-framework.application-metadata.raplib', 'trapi.searchcore.read', 'trapi.streaming.prcperf.read', 'trapi.user-framework.mobile.crud', 'trapi.data.get.data.read', 'trapi.user-framework.workspace.crud', 'trapi.search.lookup.read', 'trapi.frtb.sentimarization', 'trapi.searchcore.metadata.read', 'trapi.searchcore.lookup.read', 'trapi.streaming.synthetic.read', 'trapi.alerts.publication.crud', 'trapi.sdbold', 'trapi.graphql.subscriber.access', 'trapi.auth.cloud-credentials', 'trapi.alerts.subscription.crud', 'trapi.search.read', 'trapi.data.quantitative-analytics.read', 'trapi.data.historical-pricing.events.read', 'trapi.search.metadata.read'}
Missing scopes: {'trapi.streaming.pricing.read'}
Json file:
Note: I havent filled "url" : "YOUR DEPLOYED HOST:PORT GOES HERE!" or "username" : "YOUR DACS ID GOES HERE!",
{
"logs": {
"level": "debug",
"transports": {
"console": {
"enabled": false
},
"file": {
"enabled": false,
"name": "refinitiv-data-lib.log"
}
}
},
"sessions": {
"default": "platform.rdp",
"platform": {
"rdp": {
"signon_control":true,
"app-key": "[My_KEY]",
"username": "[My_user_name]",
"password": "[My_password]"
},
"deployed": {
"app-key":"[My_KEY]",
"realtime-distribution-system": {
"url" : "YOUR DEPLOYED HOST:PORT GOES HERE!",
"dacs" : {
"username" : "YOUR DACS ID GOES HERE!",
"application-id" : 256,
"position" : ""
}
}
}
},
"desktop": {
"workspace": {
"app-key": "[My_KEY]"
}
}
}
}