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)); }
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); }
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); }