public async Task<Quotes.Quote> DiscardQuote(string QuoteID) { PreCall(); /*List<KeyValuePair<string, string>> pairs = new List<KeyValuePair<string, string>>(); pairs.Add(new KeyValuePair<string, string>("id", QuoteID)); FormUrlEncodedContent Content = new FormUrlEncodedContent(pairs);*/ string s = await BitxClient.DeleteAsync(string.Format("quotes/" + QuoteID)).Result.Content.ReadAsStringAsync(); Quotes.Quote tmpTicker = null; Task<Quotes.Quote> tmp = new Task<Quotes.Quote>(() => { tmpTicker = JSON.JsonDeserialize<Quotes.Quote>(s); return tmpTicker; }); Calls.Add(new Call("Balanaces", true)); return tmpTicker; }
public async Task<Quotes.Quote> CreateQuote(Orders.OrderTypes Type, decimal BaseAmount, string Pair) { PreCall(); List<KeyValuePair<string, string>> pairs = new List<KeyValuePair<string, string>>(); pairs.Add(new KeyValuePair<string, string>("type", Type.ToString())); pairs.Add(new KeyValuePair<string, string>("base_amount ", BaseAmount.ToString(System.Globalization.NumberFormatInfo.InvariantInfo))); pairs.Add(new KeyValuePair<string, string>("pair", Pair)); FormUrlEncodedContent Content = new FormUrlEncodedContent(pairs); string s = await BitxClient.PostAsync(string.Format("quotes/"), Content).Result.Content.ReadAsStringAsync(); Quotes.Quote tmpTicker = null; Task<Quotes.Quote> tmp = new Task<Quotes.Quote>(() => { tmpTicker = JSON.JsonDeserialize<Quotes.Quote>(s); return tmpTicker; }); Calls.Add(new Call("Balanaces", true)); return tmpTicker; }
public async Task<Quotes.Quote> GetQuote(string QuoteID) { PreCall(); /*List<KeyValuePair<string, string>> pairs = new List<KeyValuePair<string, string>>(); pairs.Add(new KeyValuePair<string, string>("type", Type.ToString())); pairs.Add(new KeyValuePair<string, string>("base_amount ", BaseAmount.ToString(System.Globalization.NumberFormatInfo.InvariantInfo))); pairs.Add(new KeyValuePair<string, string>("pair", Pair)); FormUrlEncodedContent Content = new FormUrlEncodedContent(pairs);*/ //string s = await BitxClient.DeleteAsync(string.Format("quotes/")).Result.Content.ReadAsStringAsync(); string s = await BitxClient.GetStringAsync("quotes/"+QuoteID); Quotes.Quote tmpTicker = null; Task<Quotes.Quote> tmp = new Task<Quotes.Quote>(() => { tmpTicker = JSON.JsonDeserialize<Quotes.Quote>(s); return tmpTicker; }); Calls.Add(new Call("Balanaces", true)); return tmpTicker; }
public static jsonQuote ToJsonQuote(Quote _Quote) { return(jsonQuote.FromQuote(_Quote)); }