Error with websocket API connection to https://api.refinitiv.com/streaming/pricing/v1/

I am running the following example code: https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/RTO/python/market_price_rto_service_discovery.py as follows: ``` python3 market_price_rto_service_discovery.py --user "" --password "" --clientid ""
The output is: ``` Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ... LSEG Delivery Platform Authentication succeeded. RECEIVED: { "access_token":"", "expires_in":"600", "refresh_token":"", "scope":"trapi.streaming.pricing.read", "token_type":"Bearer" } Sending LSEG Delivery Platform service discovery request to https://api.refinitiv.com/streaming/pricing/v1/ LSEG Delivery Platform Service discovery succeeded. RECEIVED: { "services":[ { "dataFormat":[ "tr_json2" ], "endpoint":"ap-northeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net", "location":[ "ap-northeast-1a" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"ap-northeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net", "location":[ "ap-northeast-1a", "ap-northeast-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"ap-northeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net", "location":[ "ap-northeast-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"ap-southeast-1-aws-1-sm.optimized-pricing-api.refinitiv.net", "location":[ "ap-southeast-1a" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"ap-southeast-1-aws-3-sm.optimized-pricing-api.refinitiv.net", "location":[ "ap-southeast-1a", "ap-southeast-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"ap-southeast-1-aws-2-sm.optimized-pricing-api.refinitiv.net", "location":[ "ap-southeast-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"eu-central-1-aws-1-sm.optimized-pricing-api.refinitiv.net", "location":[ "eu-central-1a" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"eu-central-1-aws-3-sm.optimized-pricing-api.refinitiv.net", "location":[ "eu-central-1a", "eu-central-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"eu-central-1-aws-2-sm.optimized-pricing-api.refinitiv.net", "location":[ "eu-central-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"eu-west-1-aws-1-sm.optimized-pricing-api.refinitiv.net", "location":[ "eu-west-1a" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"eu-west-1-aws-3-sm.optimized-pricing-api.refinitiv.net", "location":[ "eu-west-1a", "eu-west-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"eu-west-1-aws-2-sm.optimized-pricing-api.refinitiv.net", "location":[ "eu-west-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"us-east-1-aws-1-sm.optimized-pricing-api.refinitiv.net", "location":[ "us-east-1a" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"us-east-1-aws-3-sm.optimized-pricing-api.refinitiv.net", "location":[ "us-east-1a", "us-east-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"us-east-1-aws-2-sm.optimized-pricing-api.refinitiv.net", "location":[ "us-east-1b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"us-east-2-aws-1-sm.optimized-pricing-api.refinitiv.net", "location":[ "us-east-2a" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"us-east-2-aws-3-sm.optimized-pricing-api.refinitiv.net", "location":[ "us-east-2a", "us-east-2b" ], "port":443, "provider":"aws", "transport":"websocket" }, { "dataFormat":[ "tr_json2" ], "endpoint":"us-east-2-aws-2-sm.optimized-pricing-api.refinitiv.net", "location":[ "us-east-2b" ], "port":443, "provider":"aws", "transport":"websocket" } ] } Connecting to WebSocket wss://us-east-1-aws-3-sm.optimized-pricing-api.refinitiv.net:443/WebSocket for session1... WebSocket successfully connected for session1! SENT on session1: { "Domain":"Login", "ID":1, "Key":{ "Elements":{ "ApplicationId":"256", "AuthenticationToken":"", "Position":"127.0.1.1/WSL-CPC-D-JXE2L" }, "NameType":"AuthnToken" } } RECEIVED on session1: [ { "Domain":"Login", "ID":1, "Key":{ "Name":"AQIC5wM2LY4SfcwTbT4uNW3hysQJ3fJcaRaq3lEuC75b1SI%3D%40AAJTSQACMTAAAlNLABQtMTc1MjA0NTA0NTU4NzkyMzA4MwACUzEAAjI1%23" }, "State":{ "Code":"UsageError", "Data":"Suspect", "Stream":"Closed", "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." }, "Type":"Status" } ]
I tried adding the `--ric "GBP=X"` argument and received the same error. Technical support noticed that the service discovery process had determined that a small ("sm") endpoint should be used. I edited the script to hard-code it to use "us-east-1-aws-3-lrg.optimized-pricing-api.refinitiv.net", and login failed with the following message:
"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."
When I hard-code it to use "us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net", I get a completely different error:
Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ... LSEG Delivery Platform Authentication succeeded. RECEIVED: { "access_token":"", "expires_in":"600", "refresh_token":"", "scope":"trapi.streaming.pricing.read", "token_type":"Bearer" } Connecting to WebSocket wss://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net/WebSocket for session1... Session: session1; Error: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007) WebSocket Closed for session1 Reconnect to the endpoint for session1 after 3 seconds... Connecting to WebSocket wss://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net/WebSocket for session1... Session: session1; Error: [Errno 104] Connection reset by peer WebSocket Closed for session1 Reconnect to the endpoint for session1 after 3 seconds... Connecting to WebSocket wss://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net/WebSocket for session1... Session: session1; Error: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007) WebSocket Closed for session1 Reconnect to the endpoint for session1 after 3 seconds...
We use these credentials successfully to connect using the Java SDK. How can I establish a connection to the websocket API using this account?
Answers
-
Watchlist size of 0 implies that it is an account permissioning issue (improperly configured). Please raise it up with the account manager.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 37 Alpha
- 167 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 708 Datastream
- 1.5K DSS
- 633 Eikon COM
- 5.3K Eikon Data APIs
- 14 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 6 Trading API
- 3K Elektron
- 1.5K EMA
- 259 ETA
- 570 WebSocket API
- 40 FX Venues
- 16 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 4 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 284 Open PermID
- 47 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 24 RDMS
- 2.2K Refinitiv Data Platform
- 890 Refinitiv Data Platform Libraries
- 5 LSEG Due Diligence
- 1 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
- 124 Open DACS
- 1.1K RFA
- 108 UPA
- 196 TREP Infrastructure
- 232 TRKD
- 921 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 105 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛