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 /
avatar image
Question by johan.lundquist · Sep 26, 2018 at 04:41 AM · websocketconnectionwebsockets api

WebSocket API "Connection is already closed"

Hi,

I am testing yours WebSocket API from the provided example market_price.py downloaded from this site.

I get following response "Connection already closed" and would appreciate help on how to solve it.

/market_price.py
Python version 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)]
Websocket_client version 0.53.0

Connecting to WebSocket ws://ap-server1t:14002/WebSocket ...
Connection is already closed.
WebSocket Closed

Kind regards,

Johan

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.

3 Replies

  • Sort: 
avatar image
Best Answer
Answer by julien.dominici · Sep 26, 2018 at 04:44 AM

Hi Johan,

Port 14002/tcp usually binds the RSSL adapter of the ADS, when WS api listens onto a different port (15000/tcp when using default), are you sure you are addressing the correct port ?

Regards,

Julien

Comment
umer.nalla
jirapongse.phuriphanvichai
veerapath.rungruengrayubkul
wasin.waeosri
johan.lundquist
nitin.parmar

People who like this

6 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 umer.nalla · Sep 26, 2018 at 04:46 AM

Hi @johan.lundquist

Can you confirm that 14002 is the correct port for the server you are connecting to?

The default port for Websocket is 15000 and the 14002 port is actually the default port for RSSL type connections.

Comment
johan.lundquist

People who like this

1 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 johan.lundquist · Sep 26, 2018 at 05:07 AM

Thank you Julien and Umer, you are absolutely right my mistake it works as expected now.

Kind regards,

Johan

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 >
8 People are following this question.

Related Questions

How to set up the Python Market Price Authentication - global default variables?

Not getting rate update message from Websocket Api java example after approx 9 minutes (using git web socket example)

How many concurrent connections can the WebSocket API handle?​ (from WebSocket API Webinar Nov 29)

If the connection is down, what should the application do? Does the application need to send all requests including login again? (from WebSocket API Webinar Nov 29)

WebSocket API Status Stream is Closed. what should be recovery logic ?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • 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
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • 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
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges