Exemple #1
0
        public TransformWithdrow PostWihdrow(string currencyPair, string address, decimal amount)
        {
            Dictionary <string, object> postdata = new Dictionary <string, object>();

            postdata.Add("currency", currencyPair);
            postdata.Add("wallet", address);
            postdata.Add("amount", amount);
            var               str  = LiveCoinPostRequst.PostString("payment/out/coin", postdata.ToHttpPostString());
            Field             temp = JsonConvert.DeserializeObject <Field>(str);
            TransformWithdrow tr   = new TransformWithdrow(temp.id, temp.currency, temp.wallet, temp.amount, Convert.ToDateTime(temp.date));

            return(tr);
        }
Exemple #2
0
        public string PostOrder(string currencyPair, OrderType type, decimal pricePerCoin, decimal amountQuote)
        {
            Dictionary <string, object> postdata = new Dictionary <string, object>();

            postdata.Add("currencyPair", currencyPair);
            postdata.Add("price", pricePerCoin);
            postdata.Add("quantity", amountQuote);

            var     res     = LiveCoinPostRequst.PostString(Exchange + GetOrderType(type), postdata.ToHttpPostString());
            dynamic jObject = JObject.Parse(res);

            return(Convert.ToString(jObject.id));
        }