Esempio n. 1
0
 public static void DownloadSubs(bool overwrite = false)
 {
     WriteSample(() =>
     {
         CryptoCompareServices client = new CryptoCompareServices(baseUrl);
         return(client.SubsAsync("ETH", "BTC,EUR", null, null).Result as JToken);
     },
                 "SubscriptionsByPair",
                 overwrite);
 }
Esempio n. 2
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;
            }
        }