question

Upvotes
Accepted
9 1 0 3

ERT stable connection with python

Hi,

we need to create a stable connection to ERT in cloud to download real time data no-stop. We are using Python and the WebSocketAPI but we are experiencing some problems with token refreshing. In particular we are requesting tokens with user and password authentication, refreshing them every 200 seconds (since the seem to have 300 secs expiry time) but sometimes (without an apparent reason) the refresh request fails with BadRequest error.

Since we could not find any documentation online to follow nor other example to follow except for this one (which is the base of the procedure we implemented but it seems to have the problems described above and we do not know how to retrieve the client_secret associated to our client_id to correctly test all the code chunks...), we are not very sure where the problem could be.

Is there any way to get a longer lasting token?

And, more in general, what is the best way to achieve the required result using the above technologies?

Thanks

elektronrefinitiv-realtimeelektron-sdkwebsocketsauthenticationtoken
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
13k 32 12 18

Hi @nicola.donelli,

Could your request be failing due to the expiry of the refresh token? While Access token expires every few minutes and the application is expected to use Refresh grant to get a new tokens, the Refresh token will expire after couple of hours and application is expected to use Password grant to get a new one.

Can you try one of the provided samples and see if the issue persists - https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/RDP/python


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
9 1 0 3

Thanks Gurpeet,

I'll try them for sure and I'll be back with news asap. Just one more question, since the link refers to RDP. We are quite new to the Refinitiv universe and we do not have already a clear idea of the products and today had been the first time I've heard about RDP: could you please explain what is it exactly? I know we have access to ERT in cloud, DSS and Tick History services, does this imply that we have access also to RDP? I have seen that there is a Python package for RDP (but I didn't tried it yet) , could it be of any help to reach my goals?

Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

The RDP refers to Refinitiv Data Platform, which is our platform offering with an end goal of having all the services provide data through the platform. The ERT Cloud refers to the streaming data delivery part of the RDP.

DSS and Tickhistory are different products and may converge into RDP at some time in future.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
20.3k 73 10 20

Hi @nicola.donelli

You asked about the RDP Python library, so you may find this article on the RDP Library worth reading - Discover our Refinitiv Data Platform Library (part 1)

As my colleague mentioned, we are gradually moving more and more of our content via the Data Platform. For example, some of the data available in DSS and Tick History may also be available on the Platform - allowing you to consume the data using common Restful APIs or library - rather than disparate APIs.

If you are interested in exploring the RDP content, I recommend you contact your Refinitiv Account manager and ask for a Trial RDP account.

In terms of the BadRequest error, if you test with the other examples that my colleague recommended and continue to see the same occasional error, then you need to raise a Product Support ticket for ERT in Cloud - which is now rebranded to 'Refinitiv Real-Time - Optimized' via My.Refinitiv

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea