Ejemplo n.º 1
0
        public OpenOrder SellOrderLimit(decimal amount, decimal price, string book)
        {
            string additionaljsonparameters =
                String.Format(@", ""amount"": ""{0}"", ""price"": ""{1}"", ""book"": ""{2}""", amount, price, book);
            dynamic r = JsonWebRequestWithAuthentication("https://api.quadrigacx.com/v2/sell", "POST", additionaljsonparameters);

            processError(r);
            return(OpenOrder.GetFromJson(r, book));
        }
Ejemplo n.º 2
0
        public IEnumerable <OpenOrder> GetOpenOrders(string book = "btc_cad")
        {
            string additionaljsonparameters =
                String.Format(@", ""book"": ""{0}""", book);
            dynamic r = JsonWebRequestWithAuthentication("https://api.quadrigacx.com/v2/open_orders", "POST", additionaljsonparameters);

            processError(r);
            List <OpenOrder> l = new List <OpenOrder>();

            foreach (dynamic tran in r)
            {
                l.Add(OpenOrder.GetFromJson(tran, book));
            }
            return(l);
        }
Ejemplo n.º 3
0
        public IEnumerable <OpenOrder> LookupOrder(string orderid)
        {
            string additionaljsonparameters =
                String.Format(@", ""id"": ""{0}""", orderid);
            dynamic r = JsonWebRequestWithAuthentication("https://api.quadrigacx.com/v2/lookup_order", "POST", additionaljsonparameters);

            processError(r);
            List <OpenOrder> l = new List <OpenOrder>();

            foreach (dynamic tran in r)
            {
                processError(tran);
                l.Add(OpenOrder.GetFromJson(tran, tran.book.ToString()));
            }
            return(l);
        }