コード例 #1
0
        public string AuthQuery(string method, Dictionary <string, string> postDict)
        {
            string time = DateTime.UtcNow.ToString("s");
            // string id = AuthUtility.GetNonceBySeconds().ToString();
            string id = GetVircurexSign(time + new Random().NextDouble().ToString());
            //用分号分开的字符串
            string tokenMsg = securityWord + ";" + userName + ";" + time + ";" + id + ";" + "get_balances";

            var    sign = AuthUtility.GetVircurexSign(tokenMsg);
            string url  = "https://vircurex.com/api/get_balances.json?account=cyj100&id=" + id + "&token=" + sign + "&timestamp=" + time;

            using (WebClient webClient = new WebClient())
            {
                string result = webClient.DownloadString(url);
                return(result);
            }
        }