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

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @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).


Answers

  • 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

  • @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


  • 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.