Cannot connect to wss://live.ctraderapi.com:5036 or wss://demo.ctraderaip.com:5036
Cannot connect to wss://live.ctraderapi.com:5036 or wss://demo.ctraderaip.com:5036
13 Nov 2023, 12:57
Hi. I noticed that I can no longer connect to wss://live.ctraderapi.com:5036 or wss://demo.ctraderapi.com:5036.
This is the minimal python code to reproduce that
import websockets
import asyncio
async def f():
async with websockets.connect('wss://demo.ctraderapi.com:5036') as ws:
print('ctrader connected.')
await ws.send('test')
print(await ws.recv())
asyncio.run(f())
Executing this code will get a timeout error, and “ctrader connected.” message was never printed.
The same python code is confirmed to be able to connect to wss://fstream.binance.com/ws.
My C++ code with boost library which used to connect also fails to connect now so this isn't on python or its libraries.
Replies
popular_jitters056
13 Nov 2023, 18:05
( Updated at: 14 Nov 2023, 06:55 )
RE: Cannot connect to wss://live.ctraderapi.com:5036 or wss://demo.ctraderaip.com:5036
PanagiotisCharalampous said:
Hi there,
We cannot see any problems with the connection at the moment. Can you try to connect using Telnet and let us know the outcome?
Best regards,
Panagiotis
Running telnet demo.ctraderapi.com 5036
gives
Trying 15.197.239.248...
Connected to demo.ctraderapi.com.
Escape character is '^]'.
But then further inputting GET /index.html
gives no response at all, until Connection closed by foreign host.
is printed.
I believe when my C++ code used to be able to connect back then, sending any HTTP request will get a HTTP response back, be it either an error ( the expected response in this test) or an websocket upgrade.
Doing telnet google.com 80
and then GET /index.html
gives me the HTTP response and an html.
@popular_jitters056
vasile.peste
25 Nov 2023, 10:14
( Updated at: 26 Nov 2023, 07:27 )
Not working
Same, I cannot connect
wss://live.ctraderapi.com:5036
You can test quickly here
https://www.piesocket.com/websocket-tester
The server closes the connection and throws a SSL error
@vasile.peste
PanagiotisCharalampous
13 Nov 2023, 15:13
Hi there,
We cannot see any problems with the connection at the moment. Can you try to connect using Telnet and let us know the outcome?
Best regards,
Panagiotis
@PanagiotisCharalampous