Different result between rdp API with workspace app and using config file.

adam.leroux
adam.leroux Newcomer
edited April 29 in Workspace SDK

Hi all,

We are currently building out an application that is using the Refinitiv RDP API to retrieve information. We have found two ways of connecting to the API :

  • We can just open a session using rd.open_session(), when running code locally with the Refinitiv workspace open
  • We can specify a config file containing our API key using rd.open_session(config_name='credentials.json') when running code for example in VMs in the cloud.

However I've noticed that I get different results from the exact same code when using those two methods.

From exemple, i'm running

df = rd.get_data(
universe = ['DE294876855=RRPS'],
fields = ['TR.FiMaturityBenchmarkRIC']
)
print(df)

To get the pricing benchmark of a specific bond.

Using rd.open_session() (or the codebook in WS), i get result :

     Instrument Maturity Benchmark RIC
0  DE294876855=RRPS              EU10YT=RR

Which is the expected result.

Running the exact same code with

rd.open_session(config_name='credentials.json')

from a VM, i get

RDError: Error code -1 | The access to field(s) denied. Requested universes: ['DE294876855=RRPS']. Requested fields: ['TR.FIMATURITYBENCHMARKRIC']

FYI the config.json file looks like this :

{
"logs": {
"level": "debug",
"transports": {
"console": {
"enabled": false
},
"file": {
"enabled": false,
"name": "refinitiv-data-lib.log"
}
}
},
"sessions": {
"default": "platform.rdp",
"platform": {
"rdp": {
"app-key": "APPKEY",
"username": "USERNAME",
"password": "PW"
},
"deployed": {
"app-key": "APPKEY",
"realtime-distribution-system": {
"url" : "URL",
"dacs" : {
"username" : "USERNAME",
"application-id" : APPID,
"position" : ""
}
}
}
},
"desktop": {
"workspace": {
"app-key": "APPKEY"
}
}
}
}

Has anyone encountered something like this ?

Thank you.

Adam LeRoux

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @adam.leroux

    I checked the problem statement. Please confirm my understanding below:

    • We can just open a session using rd.open_session(), when running code locally with the Refinitiv workspace open: This scenario uses a Desktop Session.
    • We can specify a config file containing our API key using rd.open_session(config_name='credentials.json') when running code for example in VMs in the cloud.: This scenario uses a Platform Session.

    If I am understanding the scenarios correctly. Please be informed that a Desktop Session connects and consumes data from the Workspace platform, while a Platform Session connects and consumes data from the Data Platform (or Delivery Platform, aka RDP). They are different platforms. The content sets, credentials, and permissions are not the same.

    The permissioned you have on the Workspace platform/desktop application and the permissioned you have on the Data Platform are not the same.

    If you need the same item permission on the Data Platform, please contact your LSEG Representative or Account Manager to help you with this permission issue. This permission issue cannot be fix via the code.

Answers