Hello all,
For the past few weeks I have been receiving significant response times from every call I am doing (UK and AUS). i.e. listMarketBook, placeBet, cancelBet etc. It happens once to several times a minute and the responses ranges from 200 milliseconds all the way to a 3 second time out that I've configured for the web request.
This is the code I use to create the web request. ContentLength is set afterwards to the size of the JSON object.
Because of these slowdowns it is making my bot quite inefficient so any help would be greatly appreciated.
Thanks you
For the past few weeks I have been receiving significant response times from every call I am doing (UK and AUS). i.e. listMarketBook, placeBet, cancelBet etc. It happens once to several times a minute and the responses ranges from 200 milliseconds all the way to a 3 second time out that I've configured for the web request.
This is the code I use to create the web request. ContentLength is set afterwards to the size of the JSON object.
Code:
protected static HttpWebRequest CreateWebRequest(String restEndPoint, int timeout) {
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(restEndPoint);
request.Method = "POST";
request.ContentType = "application/json";
request.ContentLength = 0;
request.Timeout = timeout;
request.KeepAlive = true;
request.AllowAutoRedirect = true;
request.Accept = "application/json";
request.Headers["X-Application"] = BetFairService.ApplicationKey;
request.Headers["X-Authentication"] = BetFairService.SessionKey;
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
request.Headers.Add(HttpRequestHeader.AcceptCharset, "ISO-8859-1,utf-8");
request.Headers.Add(HttpRequestHeader.AcceptLanguage, "en-US");
request.Headers.Add(HttpRequestHeader.Pragma, "no-cache");
request.Headers.Add(HttpRequestHeader.CacheControl, "no-cache");
return request;
}
Thanks you


Comment