RDP Streaming Error Authentication Java

Hello,
Im trying to connecto via websocket to RDP Streaming with the following code:
WS_ADDRESS = "wss://amer-3-t2.streaming-pricing-api.refinitiv.com/WebSocket/";
TRKD_AUTHEN_ADDRESS = "https://api.refinitiv.com/auth/oauth2/v1/token";
WS_PROTOCOL = "tr_json2";
WS_PORT = "443";
When i Send the authentication method i got
{ "access_token":"eyJ0eXA.......", "refresh_token":"3498eba0-a27a-4598-a4e8-e870bac77881", "expires_in":"300" , "scope":"", "token_type":"Bearer" }
So, if the auth is ok the code continues to connect via websocket with the WS_ADDRESS, WS_PROTOCOL and WS_PORT and in the onConnected method I send the authentication
{
"ID": 2,
"Domain": "Login",
"Key": {
"NameType": "AuthnToken",
"Elements": {
"AuthenticationToken": "eyJ0eXA....",
"Position": "192.168.1.20",
"ApplicationId": "58dc1....."
}
}
}
And after that I got
RECEIVED:[{"ID":2,"Type":"Status","Domain":"Login","Key":{"Name":"AQIC5wM2LY4SfcwxLcZkqob04mRDlACLtHarWIIpBxXLpog%3D%40AAJTSQACMjAAAlNLABMxOTk2MzA0NDkxMzM1NzMwODAxAAJTMQACMzQ%3D%23"},"State":{"Stream":"Closed","Data":"Suspect","Code":"UsageError","Text":"Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [3001,20000] supported for this ADS fanout tier for this type of connection."}}]
2021-03-25 13:08:11.844 [INFO ] [c.t.w.c.WebSocketConnection:87] - Process Message type Status
2021-03-25 13:08:11.844 [INFO ] [c.t.w.c.WebSocketConnection:113] - State Stream Closed state DataSuspect
Can you helpme what Im doing wrong?Thanks.
Best Answer
-
Hi @isanchez
I discussed this with your account team and later in the day I tried to recreate your scenario.
I am now able to connect using your MachineID to a t1 endpoint e.g.
amer-3-t1.streaming-pricing-api.refinitiv.com
I can also connect using the service discovery examples mentioned previously - which automatically select a valid endpoint for you.
IF I try to connect to the wrong tier e.g. t2, I get the following:
Login Rejected. Watchlist size of 2500 for 'WS JSON2' connection
Which is now showing a non-zero watchlist size.
Note that because you're on a trial you will only be able to access certain delayed RICs e.g.
/EUR=
where / = delayed and EUR= is the RIC e.g. for EURO
Your account team should be able to confirm which set of RICS you are licenced for.
If you try to request an unlicensed RIC you will see something like:
Text":"Access Denied: User req to PE(xxx)
0
Answers
-
Hello @isanchez,
You are connecting to a specific RTTO endpoint via wss://amer-3-t2.streaming-pricing-api.refinitiv.com/WebSocket/ address.
Most likely you are not connecting to the appropriate endpoint, based on what tier you are assigned as RTTO customer.
The tiers are 1, 2 and 3, if you do not have this information, you can find your assigned tier from your Refinitiv account manager.
Currently you are connecting to tier2 via t2.
I would like to suggest, instead of connecting to a specific endpoint, to try example market_price_service_ discovery, that can be downloaded as Websocket API Sample Applications. This example should discover the appropriate endpoint to connect to on your behalf.
0 -
Hello @zoya faberov,
I ask this to our account manager for what tier the account belogs to, but He wants more information how to identify in a better way this. Can you help me please with more information
Thanks
0 -
Hello @isanchez,
I would recommend using discovery mechanism in market_price_service_discover.py instead of pointing directly to the specific endpoint, as it also means that if the specific endpoint is temporarily unavailable, your connection is assigned to an available endpoint and succeeds.
More information on the currently available endpoints can be found in Refinitiv Real-Time - Optimized Install and Config Guide, section Current Endpoints.
0 -
From my checking. amer-3-t2.streaming-pricing-api.refinitiv.com supports TCP connection which is for Refinitiv Real-Time SDK.
awstcpamer-1-t2.streaming-pricing-api.refinitiv.com14002rwfus-east-1aawstcpamer-3-t2.streaming-pricing-api.refinitiv.com14002rwfus-east-1a,us-east-1bawstcpamer-2-t2.streaming-pricing-api.refinitiv.com14002rwfus-east-1bTo use the WebSocket connection, you need to connect to the following endpoints.
awswebsocketamer-1-t3.streaming-pricing-api.refinitiv.com443tr_json2us-east-1aawswebsocketamer-3-t3.streaming-pricing-api.refinitiv.com443tr_json2us-east-1a,us-east-1bawswebsocketamer-2-t3.streaming-pricing-api.refinitiv.com443tr_json2us-east-1b0 -
Hello @isanchez
The Service Discovery example for Java is MarketPriceRdpGwServiceDiscovery.java which available on https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/RDP/java website or the WebSocket example download page.
0 -
Hello @Jirapongse,
I tried with the three endpoints and for all I got Failed to resolve hostname aawswebsocketamer-3-t3.streaming-pricing-api.refinitiv.com:443: aawswebsocketamer-3-t3.streaming-pricing-api.refinitiv.com
I need to apply some configuration before?
Thanks
0 -
Hi @isanchez
Were you able to connect using the Service Discovery examples mentioned above?
The tier 2 (t2) endpoint you tried to connect in your original post supports a watchlist size of 3k-20k - which (according to the error) your machine ID is not permissioned for.
So, you should try a tier1 or tier3 endpoint e.g.
amer-3-t1.streaming-pricing-api.refinitiv.com (watchlist size of 1-3k)
amer-3-t3.streaming-pricing-api.refinitiv.com (watchlist size of 20k-50k)
However, as mentioned by my colleagues it would be better to use the service discovery mechanism - which will discover the appropriate endpoint and also provide alternative endpoints in case one is unavailable.
0 -
I execute the market_price_service discovery found in this link
https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/RDP/python
And i Got
Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ...
Refinitiv Data Platform authentication HTTP code: 401 Unauthorized
Thanks
0 -
Hi @umer.nalla, with the first one I got
RECEIVED:[{"ID":1,"Type":"Status","Domain":"Login","Key":{"Name":"AQIC.."},"State":{"Stream":"Closed","Data":"Suspect","Code":"UsageError","Text":"Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [20001,50000] supported for this ADS fanout tier for this type of connection."}}]
And with the second one
RECEIVED:[{"ID":1,"Type":"Status","Domain":"Login","Key":{"Name":"AQIC5wM2LY4SfczYS0WaP5d3p3zCUhB0UgwCyPR5kY%2BrnIY%3D%40AAJTSQACMjAAAlNLABMtNTA5ODgzMjQ2MDE5NDU4NzI5AAJTMQACMzQ%3D%23"},"State":{"Stream":"Closed","Data":"Suspect","Code":"UsageError","Text":"Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [20001,50000] supported for this ADS fanout tier for this type of connection."}}]
In both case the auth method to retrieve the token was OK
{ "access_token":"eyJ0eXAiOiJhd.", "expires_in":"300" , "scope":"", "token_type":"Bearer" }
I execute the market_price_service discovery found in this link
https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/RDP/python
And i Got
Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token
Refinitiv Data Platform authentication HTTP code: 401 Unauthorized
Thanks
0 -
Hello @isanchez,
Please verify that you are pointing to the endpoints you think you point.
When pointing to the endpoints t1 and t3, the error message, if it is not the assigned tier for user, should differ in "range". The message that you show is returned on connecting to t3. The message on connecting to t1 should be "
"Text":"Login Rejected. Watchlist size of 50000 for 'WS JSON2' connection is outside of range [1,3000] supported for this ADS fanout tier for this type of connection."
},
----
Please confirm, on running discovery example, you should be connecting to the same authentication endpoint
https://api.refinitiv.com:443/auth/oauth2/v1/token
as with the other example, however, the authentication request results in unauthorized, or the next request (for the list of the available endpoints) results in unauthorized for you?
0 -
Hi @isanchez
The messages you show above indicate that on both occasions you tried to connect to a t3 endpoint which you are not licenced for.
If you had connected to a t1 endpoint and were not licenced, I would have expected to see the following:
Login Rejected. Watchlist size of 50000 for 'WS JSON2' connection is outside of range [1,3000] supported for this ADS fanout tier for this type of connection.
Please try again ensuring you are trying to connect to amer-3-t1.streaming-pricing-api.refinitiv.com
Also, please ask your Account Manager to contact me directly - I will also try to identify and reach out to them.
0 -
Hi @isanchez
Can you confirm you have a machineID and long password?
A MachineID looks something like GE-A-1234567-8-1234
If you are able to add a reply here with the following option selected:
and provide your MachineID.
If you are unable to select the above option, please do NOT include your machineID in the reply.
0 -
Hello @umer.nalla
Of Course I tried the connection to the following endpoint
Sending authentication request...
Status code 200
{ "access_token":"", "expires_in":"300" , "scope":"", "token_type":"Bearer" }
Authentication Succeeded. Received AuthToken: eyJ0eXAiOiJ.
Connecting to wss://amer-3-t1.streaming-pricing-api.refinitiv.com/WebSocket/
WebSocket successfully connected!
SENT on {
"ID": 1,
"Domain": "Login",
"Key": {
"NameType": "AuthnToken",
"Elements": {
"AuthenticationToken": "",
"Position": "172.22.144.1",
"ApplicationId": "58dc1263574f46348361f1f2d9922a11c09270f3"
}
}
}
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."}}
Process Message type Status
State Stream Closed state DataSuspect
Yes I Have MachineID and I Set a strong Password and I cannot see the option to share with you this credentials.
Thanks,
0 -
Hi @isanchez
Thanks for confirming - I was puzzled by your previous reply which said that for both t1 and t3 endpoints you received "Login Rejected. Watchlist size of 0 for 'WS JSON2' connection is outside of range [20001,50000] supported for this ADS fanout tier for this type of connection."}}]
which did not make sense.
Your account manager has made contact and I have asked him for your MachineID so I can check what you may be licenced for.
I am not a licensing person, I am API specialist- but my suspicion at this point that your MachinedID licence has been incorrectly configured.
I will discuss this with your Account Manager and report back.
0 -
Hello @umer.nalla,
Yes they provides me and example with python to execute service discovery, and we are waiting to the permission to the rics that we want to consume, I really aprecciate the support.
Thanks
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 556 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 648 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛