public static void DownloadPricemulti(bool overwrite = false) { WriteSample(() => { CryptoCompareServices client = new CryptoCompareServices(baseUrl); return(client.PricemultiAsync(null, "ETH,DASH", "BTC,USD,EUR", null, null, null).Result as JToken); }, "PriceMulti", overwrite); }
public static void ShowCoins() { ICryptoCompareServices services = new CryptoCompareServices(new CryptoCompareConfig()); CoinList coinList = services.CoinlistAsync(null, null).Result; Debug.WriteLine(coinList); foreach (KeyValuePair <string, CoinData> keyValuePair in coinList.Data) { Debug.WriteLine(keyValuePair.Key + " : " + keyValuePair.Value.FullName); } }
public static void ShowSubscriptions() { try { ICryptoCompareServices services = new CryptoCompareServices(new CryptoCompareConfig()); foreach (KeyValuePair <string, SubscriptionByPair> keyValuePair in services.SubsAsync("BTC", new[] { "EUR" }, null, null).Result) { Debug.WriteLine(keyValuePair.Key); Debug.Indent(); { Debug.WriteLine("TRADES"); Debug.Indent(); foreach (string s in keyValuePair.Value.TRADES) { Debug.WriteLine(s); } Debug.Unindent(); Debug.WriteLine("Current"); Debug.Indent(); foreach (string s in keyValuePair.Value.CURRENT) { Debug.WriteLine(s); } Debug.Unindent(); Debug.WriteLine("CURRENTAGG"); Debug.Indent(); Debug.WriteLine(keyValuePair.Value.CURRENTAGG); Debug.Unindent(); } Debug.Unindent(); } } catch (Exception exception) { Debug.WriteLine(exception); throw; } }