Ejemplo n.º 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);
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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;
            }
        }