I noticed when running a live algo using market orders for options that the timeout of 5s to get a fill response seems too short ?
The algo got the fill responses after about 13s but in the meantime the algo had called the Quit statement to exit as the market order API call responded with an error because of the timeout being too short.
Is this a known issue? Perhaps the timeout needs to be configurable?

ERROR] FATAL UNHANDLED EXCEPTION: at RestSharp.RestClient.DoExecuteAsPost (RestSharp.IHttp http, System.String method) [0x00000] in <a413af11872d4786add172686a6728e8>:0 , at RestSharp.RestClient.Execute (RestSharp.IRestRequest request, System.String httpMethod, System.Func`3[T1,T2,TResult] getResponse) [0x00022] in <a413af11872d4786add172686a6728e8>:0 ,ApiConnection.TryRequest(): System.Net.WebException: The request timed out, at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00052] in <59be416de143456b88b9988284f43350>:0 , at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <59be416de143456b88b9988284f43350>:0 , at RestSharp.Http.GetRawResponse (System.Net.HttpWebRequest request) [0x00000] in <a413af11872d4786add172686a6728e8>:0 ,ApiConnection.TryRequest(): System.Net.WebException: Error getting response stream (ReadDone2): ReceiveFailure ---> System.Exception: at System.Net.WebConnection.HandleError (System.Net.WebExceptionStatus st, System.Exception e, System.String where) [0x00000] in <59be416de143456b88b9988284f43350>:0 , at System.Net.WebConnection.ReadDone (System.IAsyncResult result) [0x00000] in <59be416de143456b88b9988284f43350>:0 , at System.Runtime.Remoting.Messaging.AsyncResult.Invoke (System.Runtime.Remoting.Messaging.AsyncResult ) [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 , at System.Runtime.Remoting.Messaging.AsyncResult.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 , at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 , at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 , at System.Net.WebConnection.HandleError (System.Net.WebExceptionStatus st, System.Exception e, System.String where) [0x00044] in <59be416de143456b88b9988284f43350>:0 , --- End of inner exception stack trace ---, at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <59be416de143456b88b9988284f43350>:0 , at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <59be416de143456b88b9988284f43350>:0 , at RestSharp.Http.GetRawResponse (System.Net.HttpWebRequest request) [0x00000] in <a413af11872d4786add172686a6728e8>:0 ,SecurityTransactionManager.WaitForOrder(): Order did not fill within 5 seconds.,AlgorithmManager.Run(): Algorithm state changed to Stopped at 1/7/2019 8:56:10 PM,Cloud.Api.SetAlgorithmStatus(): Request Resource: live/status/update Error(s): Invalid value for status: 'Completed'. Valid values are: Running,Stopped,RuntimeError,Liquidated

Author