WebSocket can only connect server with machine name but not with actual IP address

Hi, I have a python script which connects to TREP server through websocket api for getting real-time quotes. It works when I use the host name but not for IP address - the script need to run in an environment which is not aware of the machine name - any suggestions, thanks

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    @lzhuang1, In addition to trying the "provided API samples", can you try to check if the IP address is listening on the websocket port: 15000.

    Try:

    >>telnet ip.ip.ip.ip 15000

    Where ip is the IP address of ADS providing websocket connection.

Answers