websocketstream-socket-client

Xtb broker socket connection


Hello I'm trying to connect to websocket connection shared by xtb stock broker.

The documentation is here: http://developers.xstore.pro/documentation/2.5.0

There is mentioned: http://developers.xstore.pro/documentation/2.5.0#communication-with-the-xstation-api that I should use port 5113 and use host xapi.xtb.com for real account and streaming data.

That's why I create URI like below (wss is because SSL connection):

wss://xapi.xtb.com:5113

I'm not able to connect: enter image description here

What's wrong?


Solution

  • xapi.xtb.com is not for websocket communication. They have another links in their documentation for websockets:

    wss://ws.xtb.com/demo
    
    wss://ws.xtb.com/demoStream
    
    wss://ws.xtb.com/real
    
    wss://ws.xtb.com/realStream