cTrader Automate Cloud Connectivity Issues: Unable to Make Outbound HTTP Requests

Created at 25 Sep 2024, 19:14
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
FE

fer.1996

Joined 25.09.2024

cTrader Automate Cloud Connectivity Issues: Unable to Make Outbound HTTP Requests
25 Sep 2024, 19:14


Hello community,

I am developing a cBot in cTrader Automate with the functionality to send notifications. While everything works correctly in my local environment, when trying to deploy the cBot in the cTrader Automate cloud, I am encountering serious connectivity issues that prevent the cBot from making outbound HTTP requests.

Problem Description:

Initially, when running the cBot locally, it executes without inconvenience.

When migrating to the cTrader Automate cloud, I implemented test methods to verify Internet connectivity, returning a 503 status code (Service Unavailable) and a null response body.

 

public void TestInternetConnectivity()
{
    try
    {
        var request = new HttpRequest(new Uri("https://www.google.com"));
        request.Method = HttpMethod.Get;
        var response = Http.Send(request);
        if (response.IsSuccessful)
        {
            Print("Conectividad a Internet verificada correctamente.");
        }
        else
        {
            Print("No se pudo verificar la conectividad a Internet. Código de estado: {0}", response.StatusCode);
        }
    }
    catch (Exception ex)
    {
        Print("Error al verificar la conectividad a Internet: {0}", ex.Message);
    }
}


Results obtained:

25/09/2024 18:58:29.417 Info | Cuerpo de la respuesta: null

25/09/2024 18:58:29.417 Info | Bot iniciado y configurado correctamente.

25/09/2024 18:58:29.417 Info | No se pudo verificar la conectividad a Internet a la pagina de google. Código de estado: 503

 

 

Are there any network restrictions in the cTrader Automate Cloud environment that prevent outbound HTTP requests to external domains such as www.google.com or others?

Are there any additional settings I need to perform in the cBot or cTrader Automate environment to enable Internet connectivity?

In case there are restrictions, what solutions or alternatives would you recommend from a cBot in the cloud? 


@fer.1996
Replies

PanagiotisCharalampous
26 Sep 2024, 05:11

Hi there,

Access to the internet is not permitted to cBots executing on the cloud.

Best regards,

Panagiotis


@PanagiotisCharalampous