For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 2

Data contribution using Websocket API in Python: authentication

Hi !

I would like to use the Websocket API via Python to contribute data to Refinitiv.

I'm on Windows and I have a Workspace licence.


My account manager told me that I'm autorized to contribute to the UAT/dev environement.

I'm using websocket_authentication_argp.py from the tutorial/download page regarding the Websocket API


The problem is that I'm not sure what credential use to connect to the gateway and then to the websocket

Should I use the credentials I have to loggin to Workspace ? (username/password) what about client_id ?

Should I create an API Key using the APP Key generator in Workspace ?


Many thanks for your help

#technologywebsocketspython apiauthenticationrcc
icon clock
10 |1500

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

Upvotes
Accepted
79.2k 251 52 74

@jean-hugues.lasbatre

As far as I know, the username for RCC connections should be a machine ID, such as GEXXXX.

I am not sure that you can use Workspace credentials to connect to RCC.

You can contact your Refinitiv account team to verify the permission.

Otherwise, you can contact the Refinitiv Contributions Channel support team directly via MyRefinitiv to verify your RCC credentials.

icon clock
10 |1500

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

Upvotes
24.7k 54 17 14

Hello @jean-hugues.lasbatre

I am assuming that you are trying to contribute your market data to LSEG (Refinitiv) via the Refinitiv Contribution Channel (RCC) directly (without RTDS).

If so, please be informed that your need the RCC credential to access to RCC/RDP. The Workspace and RCC are different product which require different credential and permissions set.

rcc-sm.png


I strongly suggest you check the Contributing Data to Refinitiv Contributions Channel (RCC) via WebSocket tutorial Prerequisites section about the requirements.

If your company has Real-Time Distribution System (RTDS), you can ask your market data team to set the RTDS to connect to RCC (require RCC credential), then you can contribute data to RCC via that RTDS as well.


rcc-sm.png (111.4 KiB)
icon clock
10 |1500

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

Upvotes
3 0 0 2

Hi @wasin.w

Thanks for the update

I've followed the tutorial and was able to connect to the RDP Auth Gateway Production (https://api.refinitiv.com:443/auth/oauth2/v1/token) ; I tried using the Pre-Production but the access was denied. for user/password I used my Workspace credentials.

For client_id I created a EDP API Key using the generator in Workspace (40 character id).

Regarding the ws address I tried to connect to what seems to be the UAT/dev environment (contrib-ws1-emea1.uat.platform.refinitiv.com) but the login failed ; any idea why ?

Please find below the session log


Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ...

RDP-API Gateway Authentication succeeded. RECEIVED:

{

"access_token":"eyJ0eXAi<censored>",

"expires_in":"600",

"refresh_token":"f29eeffd-d<censored>",

"scope":"",

"token_type":"Bearer"

}

Connecting to WebSocket wss://contrib-ws1-emea1.uat.platform.refinitiv.com:443/WebSocket ... - Attempt: 1

WebSocket successfully connected!

SENT:

{

"Domain":"Login",

"ID":1,

"Key":{

"Elements":{

"ApplicationId":"256",

"AuthenticationToken":"eyJ0eXAiOiJh<censored>",

"Position":"<censored>"

},

"NameType":"AuthnToken"

}

}

RECEIVED:

[

{

"Domain":"Login",

"ID":1,

"Private":true,

"State":{

"Code":"AppAuthorizationFailed",

"Data":"Suspect",

"Stream":"Closed",

"Text":"Authentication unsuccessful"

},

"Type":"Status"

}

]

Login failed.

1

on_close() takes 1 positional argument but 3 were given

icon clock
10 |1500

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

Upvotes
3 0 0 2

Hi @Jirapongse

Thanks for the update, after they provided me with machine ID I was able to connect to RCC

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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