Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • WebSocket API /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by jpatel2 · Sep 21, 2021 at 03:37 PM · websocketsrrtorefinitiv-realtime-optimisedADS

Connecting to ADS Websocket failing

Today, the websocket was enabled on our ADS server and I am using ws://{IPaddress}:15000/websocket to try to connect to the websocket server but not able to connect to it. Receiving below error:

System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 159.43.120.70:15000

at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)

at WebSocketSharp.WebSocket.setClientStream()

at WebSocketSharp.WebSocket.doHandshake()

at WebSocketSharp.WebSocket.connect()

I am using below sample code to try and test the connection but its failing. Can you please advise what could be the issue here?

websocket-api/MarketPriceExample.cs at master · Refinitiv/websocket-api · GitHub

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Gurpreet · Sep 21, 2021 at 04:09 PM

It does not seem like your application can connect to ADS on the websocket port. It could be due to number of reasons:

1. ADS isn't really listening on websocket port - ask your market data admin to confirm and test if port 15000 is listening on the ADS machine (netstat -a)

2. Your application cannot reach ADS, i.e. it is unable to resolve the hostname

or

3. There is a firewall that is blocking the port.

Once you can confirm that you can connect to port 15000 on ADS from your machine, only then you can try out the sample.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by zoya faberov · Sep 21, 2021 at 04:24 PM

Hello @jpatel2,

I have just verified by running the same example against my testbed.

On the command line I pass three parameters:

-h myHost -p 15000 -u myUser

I would suggest contacting your market data group or admin, and confirming these parameters, as well as the service name to use.

I would also suggest testing connectivity, via telnet from your testing machine to ADS on port 15000, either yourself, or your market data group will be able to help with this test, to be sure there is connectivity open to ADS host on 15000.

There is a small modification to code that you may need:

/* Request an item. */                                
sendMessage(                                    "{"                                    + "\"ID\": 2,"                                    
+ "\"Key\": {\"Name\":\"TRI.N\", \"Service\" : \"ELEKTRON_DD\"}"                                    + "}"                                    );

Where ELEKTRON_DD should be the service name on your local infra, that your local market data group/admin are good to confirm. However, this is not the main issue, the issue you see happens earlier in the workflow and is not related to service spec not included in the request.

Hope this helps - let us know how this works on your side.


Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by jpatel2 · Sep 29, 2021 at 02:27 PM

Hello @zoya faberov/ @Gurpreet ,

Thank you for your response. I did test the connectivity from my machine to the ADS server that is listening on port 15000 but its failing. However, its working fine for one of my colleague. So the issue is not with ADS not listening.

Maybe I do not have port 15000 open on my test machine. Does it require to be open on my test machine? i.e. an outbound connection on port 15000 on my test machine correct?

Thanks. Let me know.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by zoya faberov · Sep 29, 2021 at 03:52 PM

Hello @jpatel2 ,

If you have the admin privileges on your machine, I would review and potentially adjust any local firewall settings.

However, if you do not, or if this does not help, as there may be other causes, you may not have the route from your local machine to the infra, I would suggest to contact your local network admin/group for help with network connectivity.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Is it possible to request a list of available services from ADS in an RDTS (TREP) using web sockets API?

Websocket API - Clarifications

What is the WebSocket endpoint URL?

MRN WebSocket filter before uncompressing

Reference and/or samples to post to CONTEX using WebSockets API

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges