public override void GetPortfolios() { JsonObject jsonContent = new JsonObject(); jsonContent.Add("id", TimeManager.GetUnixTimeStampSeconds()); jsonContent.Add("method", "balance.subscribe"); jsonContent.Add("params", new JsonArray()); _wsSource.SendMessage(jsonContent.ToString()); var headers = new Dictionary <string, string>(); headers.Add("Key", _publicKey); headers.Add("Sign", SingRestData(_secretKey, "")); var result = _restChannel.SendPostQuery(PrivateRestUri, "fundingbalances", new byte[0], headers); OnPortfolioEvent(_portfolioCreator.CreatePortfolio(result)); }
public override void GetPortfolios() { JsonObject jsonContent = new JsonObject(); jsonContent.Add("id", TimeManager.GetUnixTimeStampSeconds()); jsonContent.Add("method", "balance.subscribe"); jsonContent.Add("params", new JsonArray()); _wsSource.SendMessage(jsonContent.ToString()); var headers = new Dictionary <string, string>(); headers.Add("Key", _publicKey); headers.Add("Sign", SingRestData(_secretKey, "")); var result = _restChannel.SendPostQuery(PrivateRestUri, "fundingbalances", new byte[0], headers); if (result.Contains("code\":5")) { SendLogMessage("Gate io connect error: " + JToken.Parse(result)["message"].Value <string>(), LogMessageType.Error); return; } OnPortfolioEvent(_portfolioCreator.CreatePortfolio(result)); }