Algo with Telegram url-command not working in the new cTrader Cloud

Created at 16 May 2024, 21:29
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!
HI

Hildeguard

Joined 08.12.2022

Algo with Telegram url-command not working in the new cTrader Cloud
16 May 2024, 21:29


Hello,

i use cTrader Algos and i send information about my trades via an url-command to Telegram, which usually works.

Now there is this new feature, that i can start my Algos in the cTrader cloud. However, when i use this feature, no Telegram messages are sent.

Does anyone have a solution for this issue? It may be related to the fact, that my bot needs AccessRights.FullAccess to send the messages?

The parts of my code are:

var url = string.Format("https://api.telegram.org/bot{0}/sendMessage?chat_id={1}&text={2}&parse_mode=HTML", Token, ChatId, message);

var request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
var response = (System.Net.HttpWebResponse)request.GetResponse();

public bool Send(string message, params object[] args)
        {
            var formattedMessage = string.Format(message, args);
            return Send(formattedMessage);
        }

and then for example:

TelegramBot.Send("{2} | Started this-Bot on {0} with {1}-TF", SymbolName, TimeFrame, Server.Time);

 

I am happy for any suggestions


@Hildeguard
Replies

Hildeguard
17 May 2024, 18:26 ( Updated at: 19 May 2024, 05:16 )

I managed to eliminate the requirement of AccessRights.FullAccess. I create not the url i want to use and then i use Http.Get(myurl) to send the message.

This works still when i run the cBot on my computer, but does not work when i run it in the cTrader cloud.

Does this mean, Network Access is not working when a bot is started in the new cloud?


@Hildeguard

andreabertonetrading2023
12 Oct 2024, 09:38 ( Updated at: 13 Oct 2024, 05:33 )

RE: Algo with Telegram url-command not working in the new cTrader Cloud

Hildeguard said: 

I managed to eliminate the requirement of AccessRights.FullAccess. I create not the url i want to use and then i use Http.Get(myurl) to send the message.

This works still when i run the cBot on my computer, but does not work when i run it in the cTrader cloud.

Does this mean, Network Access is not working when a bot is started in the new cloud?

Hi, I also have the same problem. Did you fix the problem or not? Thank you.


@andreabertonetrading2023

PanagiotisCharalampous
13 Oct 2024, 06:05

RE: RE: Algo with Telegram url-command not working in the new cTrader Cloud

andreabertonetrading2023 said: 

Hildeguard said: 

I managed to eliminate the requirement of AccessRights.FullAccess. I create not the url i want to use and then i use Http.Get(myurl) to send the message.

This works still when i run the cBot on my computer, but does not work when i run it in the cTrader cloud.

Does this mean, Network Access is not working when a bot is started in the new cloud?

Hi, I also have the same problem. Did you fix the problem or not? Thank you.

Hi there,

Network access is not permitted for cBots executing on the cloud.

Best regards,

Panagiotis


@PanagiotisCharalampous