How can I retrieve data without logging in in to Workspace station?

Options

Hello,

I am currently able to successfully download data using method (1) after logging into Refinitiv Workstation in the Window 11 OS:

python
import os

import pandas as pd

import refinitiv.data as rd


isins = ['DE000BU3Z005', 'DE0001102531', 'DE0001141836', 'DE000BU2D004']



rd.open_session()

df_bond_characteristics = rd.get_data(

universe=isins,

fields=[

'TR.PreferredRIC',

'TR.FiAssetStatus',

'TR.FiMaturityDate',

'TR.FiIssueDate',

]

)

```

However, I would like to download *non-streaming (non-real-time)* data directly from the Refinitiv server **without logging into Workstation**, using Python code only.

To achieve this, I tried using method (2) with a Platform Session. Unfortunately, I encountered the following error:

```

refinitiv.data._errors.RDError: Error code -1 | {"code":500,"message":"Network Error"} Requested universes: ['DE000BU3Z005', 'DE0001102531', 'DE0001141836', 'DE000BU2D004']. Requested fields: ['TR.PREFERREDRIC', 'TR.FIASSETSTATUS', 'TR.FIMATURITYDATE', 'TR.FIISSUEDATE']

```

Here is the code I used for the Platform Session:

```python

import os

import pandas as pd

import refinitiv.data as rd


isins = ['DE000BU3Z005', 'DE0001102531', 'DE0001141836', 'DE000BU2D004']



RDP_LOGIN = ''

RDP_PASSWORD = 'AAAAAAA'

APP_KEY = 'AAAAAAA'


session = rd.session.platform.Definition(

app_key=APP_KEY,

grant=rd.session.platform.GrantPassword(username=RDP_LOGIN, password=RDP_PASSWORD)

).get_session()

session.open()


rd.session.set_default(session)

df_bond_characteristics = rd.get_data(

universe=isins,

fields=[

'TR.PreferredRIC',

'TR.FiAssetStatus',

'TR.FiMaturityDate',

'TR.FiIssueDate',

]

)

```

Could you please advise how I can properly retrieve non-real-time data via the Platform Session without using Refinitiv Workstation? Any guidance on resolving the network error would be greatly appreciated.

Answers

  • wasin.w
    wasin.w admin
    edited 8:07AM

    Hello @AmitShrotri

    Based on my knowledge, the TR.XXX fields are not available on the Platform session. They are for the Desktop Session (Workspace platform only).

    To use the Platform Session, you need the RDP account (either Version 1 or Version 2) with a valid permission.

    Then you can set the lseg-data.config.json file with your credential:

    • If you are using the V1, set credential in "ldp" and set default to "platform.ldp"
    • If you are using the V2, set credential in "ldpv2" and set default to "platform.ldpv2"
    {
    "logs": {
    "level": "debug",
    "transports": {
    "console": {
    "enabled": false
    },
    "file": {
    "enabled": false,
    "name": "lseg-data-lib.log"
    }
    }
    },
    "sessions": {
    "default": "platform.ldp",
    "platform": {
    "ldp": {
    "app-key": "App-Key",
    "username": "RDP Machine-ID",
    "password": "RDP Password",
    "signon_control":true
    },
    "ldpv2":{
    "client_id": "RDP Client ID",
    "client_secret": "RDP Client Secret",
    "signon_control":true,
    "app-key": ""
    }
    },

    }
    }