예제 #1
0
 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);
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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;
            }
        }