Ejemplo n.º 1
0
        public Dictionary <string, TransformBallans> GetBalances()
        {
            var postData = new Dictionary <string, object>();

            postData.Add("Currency", "");
            var str  = CryptoriaPostRequst.PostString("GetBalance", postData.ToHttpPostString());
            var temp = JsonConvert.DeserializeObject <BallanceField>(str);

            System.IFormatProvider cultureUS = new System.Globalization.CultureInfo("en-US");
            return(temp.Data.ToDictionary(x => x.Symbol, y => new TransformBallans(Convert.ToDecimal(y.Available, cultureUS), Convert.ToDecimal(y.HeldForTrades, cultureUS))));
        }
Ejemplo n.º 2
0
        public TransformWithdrow PostWihdrow(string Currency, string adrress, decimal amountQuote)
        {
            var postData = new Dictionary <string, object> {
                { "Currency", Currency },
                { "Adrress", adrress },
                { "PaymentId", "" },
                { "Amount", Convert.ToString(amountQuote) }
            };
            var str = CryptoriaPostRequst.PostString("SubmitTrade", postData.ToHttpPostString());
            var tp  = JsonConvert.DeserializeObject <JObject>(str);

            return(new TransformWithdrow(0, Currency, adrress, amountQuote, tp.Value <DateTime>("Date")));
        }
Ejemplo n.º 3
0
        public string PostOrder(string currencyPair, OrderType type, decimal pricePerCoin, decimal amountQuote)
        {
            var postData = new Dictionary <string, object> {
                { "Market", currencyPair },
                { "Type", GetOrderType(type) },
                { "Rate", Convert.ToString(pricePerCoin) },
                { "Amount", Convert.ToString(amountQuote) }
            };

            var str = CryptoriaPostRequst.PostString("SubmitTrade", postData.ToHttpPostString());
            var tp  = JsonConvert.DeserializeObject <JObject>(str);

            return(tp.Value <string>("OrderId"));
        }
Ejemplo n.º 4
0
        public Dictionary <string, string> GetDepositAddresses()
        {
            Dictionary <string, string> temp = new Dictionary <string, string>();
            List <string> currencis          = GetCoins();

            foreach (var item in currencis)
            {
                var postData = new Dictionary <string, object>();
                postData.Add("Currency", item);
                var str  = CryptoriaPostRequst.PostString("GetBalance", postData.ToHttpPostString());
                var Jobj = JsonConvert.DeserializeObject <JObject>(str);
                temp.Add(Jobj.Value <string>("Currency"), Jobj.Value <string>("Address"));
            }
            return(temp);
        }