Topics
Replies
Hildeguard
31 Mar 2025, 13:58
( Updated at: 03 Apr 2025, 05:46 )
confirming the issue
Hello,
i am facing the same issue, basically this is also the problem described in https://community.ctrader.com/forum/ctrader-algo/46695/
Anyone has a solution?
@Hildeguard
Hildeguard
27 Mar 2025, 00:24
confirming the isse
I can confirm this issue. My code worked fine before the latest update. After the update, only the first Http.Get(..) works, in my case, the telegram message is sent. This is independet, where i place the command. However, each Http.Get(..) which is triggered later, is not working anymore.
Any solutions on this?
@Hildeguard
Hildeguard
18 May 2024, 09:10
( Updated at: 19 May 2024, 05:16 )
RE: Troubles with new version
PanagiotisCharalampous said:
Hi there,
Can you share the cBot code so that we can check?
Best regards,
Panagiotis
public class MyTeleBot
{
public string Token { get; set; }
public long ChatId { get; set; }
public MyTeleBot(string token, long chatId)
{
UseTls12();
Token = token;
ChatId = chatId;
}
public string Send(string message, params object[] args)
{
var formattedMessage = string.Format(message, args);
var myurl = string.Format("https://api.telegram.org/bot{0}/sendMessage?chat_id={1}&text={2}&parse_mode=HTML", Token, ChatId, formattedMessage);
return myurl;
}
private void UseTls12()
{
// Required for SSL/TLS connection with Telegram
// Will work only on .Net 4.5 or higher
// Using number to avoid compilation error
System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)3072;
}
}
and for example onStart or onBar or onTick:
string sendthis = MyTeleBot.Send("{2} | Started this-Bot on {0} with {1}-TF", SymbolName, TimeFrame, Server.Time);
var respo = Http.Get(sendthis);
Print(respo.IsSuccessful); // -> gives False when Bot started in Cloud and True when Bot started locally
@Hildeguard
Hildeguard
17 May 2024, 18:31
( Updated at: 18 May 2024, 06:36 )
I have the same issue, see https://ctrader.com/forum/calgo-support/43776
I have not figured out any solution, yet, but i am highly interested.
@Hildeguard
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
Hildeguard
06 Apr 2025, 20:16
RE: Telegram Http.Get first message Status 202 (Ok) but following messages return Status=0 ?
comidea.it said:
FullAccess mode and classic httpClient doesnt solve the issue for me. Could you give an example for, how this would work right now? I would directly use it..
@Hildeguard