I have made changes to refinitiv-data.config.json file, but it seems they are not taken over. How to test whether the config is proper considered.
Project structure:
My config file is as follows:
{
"sessions": {
"default":"platform.rdp",
"platform": {
"rdp": {
"app-key": "xxx",
"username": "xxx",
"password": "xxx"
}
}
},
"apis": {
"data": {
"datagrid": {
"underlying-platform": "udf"
}
}
}
}
and I am trying to open a session:
import os
os.environ["RD_LIB_CONFIG_PATH"] = "./Configuration"
import refinitiv.data as rd
from refinitiv.data.content import fundamental_and_reference
import datetime
rd.open_session() -> error here:
[Error 401] - {'error': 'invalid_client', 'error_description': 'Invalid Application Credential.'}
<refinitiv.data.session.Definition object at 0x1d196f09e50 {name='rdp'}>
When I use the same credentials directly with :
session = rd.session.platform.Definition(
app_key='xxx',
grant=rd.session.platform.GrantPassword(
username= "xxx",
password="xxx"
)
).get_session()
session.open()
rd.session.set_default(session) -> I get my session opened and I also get data from
response = fundamental_and_reference.Definition(
["TRI.N", "IBM.N"],
["TR.Revenue", "TR.GrossProfit"]
).get_data()
response.data.df
I want to use config file as I am testing the differences in outputs between UDF Datagrid and RDP Datagrid