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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
68 0 2 6

WebSocket API: unable to retrieve data

Hi support,

I am unable to retrieve any data using your websocket API. Login works but then I am getting no response or a NotEntitled error. Please see the JSON messages below:

SENT:

{
  
    "Refresh": true,     "Key": {         "NameType": "AuthnToken",         "Elements": {             "ApplicationId": "256",             "Position": "172.31.0.6/32015f03110c",             "AuthenticationToken": "<hidden>"         }     },     "ID": 1,     "Domain": "Login" }

RECEIVED:

[{
  
        "ID": 1,         "Type": "Refresh",         "Domain": "Login",         "Key": {             "Name": "GE-xxxxx",             "Elements": {                 "TRCE:MaxMessagesPerSecond": 10000             }         },         "State": {             "Stream": "Open",             "Data": "Ok",             "Text": "Login accepted by host 3a6b97651e2d via ip-10-28-182-9.ap-southeast-1.compute.internal"         },         "ClearCache": false,         "DoNotCache": true,         "Private": true,         "Solicited": false     } ]

SENT:

{
  
    "Key": {         "Name": "CNH="     },     "ID": 1 }

Then nothing, no response. Ping/Pong messages keep flowing though.

When trying to send a different stream id (e.g. 2), I get a NotEntitled / Stream not found message back:

{
  
    "Key": {         "Name": "CNH="     },     "ID": 2 }

RECEIVED:

[{
  
        "ID": 2,         "Type": "Status",         "State": {             "Stream": "Closed",             "Data": "Suspect",             "Code": "NotEntitled",             "Text": "Stream not found"         },         "ClearCache": true     } ]

Trying different RICs e.g. TRI.N instead of CNH= yields the same behavior.

Could you please help identify the problem?

Thank you

#technology#productapiwebsockets
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.

Upvote
Accepted
79.4k 253 52 74

@nittandev

Thank you for reaching out to us.

According to the login refresh message, it seems that you are connecting to the contribution server (RCC).

[{
 
        "ID": 1,
        "Type": "Refresh",
        "Domain": "Login",
        "Key": {
            "Name": "GE-xxxxx",
            "Elements": {
                "TRCE:MaxMessagesPerSecond": 10000

This server is used to contribute or post data. The format of the post message looks like this:

{
    "ID": 1,
    "Key": {
        "Name": "{
                {POST_ITEM}}",
        "Service": "DSS_TRCE"
    },
    "Message": {
        "Fields": {
            "ASK": 451.57,
            "PRIMACT_1": 451.50,
            "DSPLY_NAME": "Hello RCC",
            "BID": 451.55
        },
        "ID": 0,
        "Type": "Update"
    },
    "PostID": 1,
    "Type": "Post",
    "Ack": true
}

The hostname of the contribution starts with "contrib". Please contact your Refinitiv Account team or Sales Team to verify the Refinitiv Product that you are using.

You can also refer to the Postman Examples which provide sample messages to send to Refintiv Contribution Channel (RCC) or Refinitiv Real-Time Optimized (RTO).


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
68 0 2 6

Thanks @Jirapongse for your reply.

Indeed I was sending my messages over the websocket connection we are using for contribution (contrib-ws1-apac1.platform.refinitiv.com). I did not realize there were different endpoints for contribution vs retrieving data. Thanks for the pointer.

Since my goal here is to retrieve data I switched over to ap-southeast-1-aws-1-sm.optimized-pricing-api.refinitiv.com and I am now getting the below error:

[{
  
        "ID": 1,         "Type": "Status",         "Domain": "Login",         "Key": {             "Name": "AQIC5wM2LY4Sfcyd%2BD64JSKBASZT2zOAnWcy60nfiFrvYiE%3D%40AAJTSQACMzAAAlNLABM4NjY3Mzc2MDk2MDYyNzQwNTI0AAJTMQACMjQ%3D%23"         },         "State": {             "Stream": "Closed",             "Data": "Suspect",             "Code": "UsageError",             "Text": "Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [1,3000] supported for this ADS fanout tier for this type of connection."         }     } ]

The same credentials work fine for contribution (using the contribution endpoint).

I found a support ticket on the same error message that suggests something might be wrong with my credentials. Could you please advise?

Thank you

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
79.4k 253 52 74

@nittandev

RCC and RTO credentials could be different. You may need to contact your Refinitiv Account team or Sales team if your account is for RCC or RTO.

Typically, the error means that you don't have permission to access the server.

You can use this endpoint (https://api.refinitiv.com/streaming/pricing/v1/?transport=websocket) to get a list of available servers.

1687762383131.png



1687762383131.png (97.7 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.

Upvote
68 0 2 6

Trying https://api.refinitiv.com/streaming/pricing/v1/?transport=websocket I am getting a 403 Forbidden with the following error:

{
    "error": {
        "id": "c3f4f99d-457b-4f51-bf7a-4892d9093c21",
        "code": "insufficient_scope",
        "message": "access denied. Scopes required to access the resource: [trapi.streaming.pricing.read]. Missing scopes: [trapi.streaming.pricing.read]",
        "status": "Forbidden"
    }
}

So I understand the account I am using is not entitled to access RTO. I will contact my account manager. Thanks for your help @Jirapongse.

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.