Replies

ctid8068054
06 Apr 2025, 23:04

RE: RE: Telegram Http.Get first message Status 202 (Ok) but following messages return Status=0 ?

For now, I have moved away from Spotware cTrader 5.2.5 to a previous version using broker provided cTrader (IC Markets 5.1.14).  It is working fine.   


@ctid8068054

ctid8068054
28 Mar 2025, 02:11 ( Updated at: 28 Mar 2025, 07:18 )

RE: RE: Multiple HTTP Requests Failing After First Request in cTrader 5.3.49

soskrr said: 

bml67 said: 

Update:

I just tested the newly released cTrader version 5.3.60 today — unfortunately, the bug still persists.

The second HTTP request (regardless of where it’s placed — OnStart, OnTimer, etc.) still fails silently after the first one succeeds.

Any update yet? Did you get an estimated time?

Best Regards

 

Hello there, would anyone know of a workaround until cTrader bug fixed and released ? I am stuck on 5.2.5 


@ctid8068054

ctid8068054
28 Mar 2025, 01:05 ( Updated at: 28 Mar 2025, 07:17 )

RE: RE: cAlgo API Http raises error when sending two or more requests

soskrr said: 

firemyst said: 

How do we know if you're doing anything wrong when you haven't posted any sample code demonstrating what you are doing?

using System;using cAlgo.API;using cAlgo.API.Collections;using cAlgo.API.Indicators;using cAlgo.API.Internals;namespace cAlgo.Plugins{    [Plugin(AccessRights = AccessRights.None)]    public class Test : Plugin    {        protected override void OnStart()        {            Test1();            //Test2();        }        private void Test1()        {            HttpResponse res = Http.Get("https://jsonplaceholder.typicode.com/todos/2");            if(res.IsSuccessful && res.StatusCode == 200)            {                Print(res.Body);                MessageBox.Show(res.Body);            }            Sleep(5000);            HttpResponse res2 = Http.Get("https://jsonplaceholder.typicode.com/todos/2");            if(res2.IsSuccessful && res2.StatusCode == 200)            {                Print("Success2");            } else             {                MessageBox.Show(res2.Exception.ToString());            }        }        private void Test2()        {            Http.GetAsync("https://jsonplaceholder.typicode.com/todos/2", res =>             {                if(res.IsSuccessful && res.StatusCode == 200)                {                    MessageBox.Show(res.Body);                    Http.GetAsync("https://jsonplaceholder.typicode.com/todos/1", res2 =>                     {                        if(res.IsSuccessful && res2.StatusCode == 200)                        {                            MessageBox.Show(res2.Body);                        } else {                            MessageBox.Show(res2.Exception.ToString());                        }                    });                }            });            Http.GetAsync("https://jsonplaceholder.typicode.com/todos/3", res =>             {                if(res.IsSuccessful && res.StatusCode == 200)                {                    MessageBox.Show(res.Body);                } else {                    MessageBox.Show(res.Exception.ToString());                }            });        }        protected override void OnStop()        {            // Handle Plugin stop here        }    }}

Here's the code.

 

Also suffering the same fate.  I can't see any dif between the two code blocks above.  No solution for me as yet.  

 


@ctid8068054

ctid8068054
28 Mar 2025, 01:03 ( Updated at: 28 Mar 2025, 07:16 )

RE: confirming the isse

Hildeguard said: 

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?

I am also suffering the same fate…..  Have not been able to resolve yet.  

result.Exception:cAlgo.API.HttpException: System.InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
  at System.Net.Http.HttpClient.CheckDisposedOrStarted()
  at System.Net.Http.HttpClient.set_Timeout(TimeSpan value)
  at cTrader.Automate.Instances.Http.AutomateHttpService.RequestProcessor()
 


@ctid8068054