Topics
Replies
zinger6673
14 Aug 2024, 12:43
( Updated at: 15 Aug 2024, 05:20 )
RE: RE: RE: HTTP requests with cBot Cloud instance
PanagiotisCharalampous said:
zinger6673 said:
PanagiotisCharalampous said:
Hi there,
No, internet access is not permitted for cBots executed on the cloud.
Best regards,
Panagiotis
Thanks for the reply, If internet access is not permitted then why does it say here https://help.ctrader.com/ctrader-algo/synchronisation/requirements-for-cbots/#api-features that we can connect to a WebSocket server as long its port 25345. Is this article outdated or is it possible?
using System;using cAlgo.API;namespace cAlgo.Robots { [Robot(AccessRights = AccessRights.None, AddIndicators = true)] public class TESTlistenonly : Robot { public WebSocketClient client; public string uri; protected override void OnStart() { Print("attempting connection"); client = new WebSocketClient(); var uri = new Uri("wss://server:25345/"); client.Connect(uri); Print("WebSocket connection opened"); } }}
I have my own server running on port 25345 and it works on local execution but on the cloud it says this
There was no mention of web sockets in the initial post. Yes, it's possible to use web sockets through port 25345. Does your server listen to this port?
Hello Panagiotis, thank you for the reply. Sorry I meant to say in my reply that I switched to trying WebSockets after i found out in the article no HTTP requests won't be sent. And yes my server does listen to post 25345, it works on local execution and i check it on a ping test. It's also using SSH. If you would like to try its up right now on wss://araxy.co.uk:25345/
Cloud execution
Local execution
Browser websocket test
@zinger6673
zinger6673
13 Aug 2024, 20:40
( Updated at: 14 Aug 2024, 09:58 )
RE: HTTP requests with cBot Cloud instance
PanagiotisCharalampous said:
Hi there,
No, internet access is not permitted for cBots executed on the cloud.
Best regards,
Panagiotis
Thanks for the reply, If internet access is not permitted then why does it say here https://help.ctrader.com/ctrader-algo/synchronisation/requirements-for-cbots/#api-features that we can connect to a WebSocket server as long its port 25345. Is this article outdated or is it possible?
using System;
using cAlgo.API;
namespace cAlgo.Robots {
[Robot(AccessRights = AccessRights.None, AddIndicators = true)]
public class TESTlistenonly : Robot {
public WebSocketClient client;
public string uri;
protected override void OnStart() {
Print("attempting connection");
client = new WebSocketClient();
var uri = new Uri("wss://server:25345/");
client.Connect(uri);
Print("WebSocket connection opened");
}
}
}
I have my own server running on port 25345 and it works on local execution but on the cloud it says this
@zinger6673
zinger6673
16 Aug 2024, 16:31 ( Updated at: 16 Aug 2024, 18:31 )
RE: RE: RE: RE: RE: HTTP requests with cBot Cloud instance
PanagiotisCharalampous said:
Thank you for the reply, I'm still getting the same error message, double checked the server and ran it locally again and it works fine. I think it has to be something to do with the cloud instance
@zinger6673