Hi, I am running refinitiv python examples on github and can get normal data using rd.open_session(). But when I try to get curves, it fails with Error code 401 | token expired error. Could somebody help? Thanks.
response = forward_curves.Definition(
curve_definition=forward_curves.SwapZcCurveDefinition(
currency="EUR",
index_name="EURIBOR",
discounting_tenor="OIS",
main_constituent_asset_class="Swap",
),
forward_curve_definitions=[
forward_curves.ForwardCurveDefinition(
index_tenor="3M",
forward_curve_tag="ForwardTag",
forward_start_date="2021-02-01",
forward_curve_tenors=["0D", "1D"],
forward_start_tenor="some_start_tenor",
)
],
curve_parameters=forward_curves.SwapZcCurveParameters(valuation_date="2021-02-01"),
curve_tag="some_tag",
).get_data()
response.data.df
Error message:
---------------------------------------------------------------------------RDError Traceback (most recent call last)Cell In[52], line 1----> 1 response = forward_curves.Definition( 2 curve_definition=forward_curves.SwapZcCurveDefinition( 3 currency="EUR", 4 index_name="EURIBOR", 5 discounting_tenor="OIS", 6 main_constituent_asset_class="Swap", 7 ), 8 forward_curve_definitions=[ 9 forward_curves.ForwardCurveDefinition( 10 index_tenor="3M", 11 forward_curve_tag="ForwardTag", 12 forward_start_date="2021-02-01", 13 forward_curve_tenors=["0D", "1D"], 14 forward_start_tenor="some_start_tenor", 15 ) 16 ], 17 curve_parameters=forward_curves.SwapZcCurveParameters(valuation_date="2021-02-01"), 18 curve_tag="some_tag", 19 ).get_data() 21 response.data.dfFile c:\Users\LG\Desktop\test\fennics_test\.venv\lib\site-packages\refinitiv\data\content\_content_provider_layer.py:58, in ContentUsageLoggerMixin.get_data(self, session, on_response)
...
30 error = RDError(error_code, error_message) 32 error.response = response---> 33 raise errorRDError: Error code 401 | token expired