Exemplo n.º 1
0
        private static void GlobalMetricsQuotesLatest()
        {
            var client   = new GlobalMetricsClient(ApiKey, Sandbox);
            var response = client.QuotesLatest();
            var json     = JsonConvert.SerializeObject(response, Formatting.Indented);

            ShowResponseAndWait(json);
        }
Exemplo n.º 2
0
        private static void GlobalMetricsQuotesHistorical()
        {
            Console.WriteLine("\nEnter start date (YYYY-MM-DD):");
            DateTime date;

            while (!DateTime.TryParse(Console.ReadLine(), out date))
            {
                Console.WriteLine("\nInvalid date. Please enter a date using the format YYYY-MM-DD\nEnter start date: ");
            }

            var client   = new GlobalMetricsClient(ApiKey, Sandbox);
            var response = client.QuotesHistorical(date);
            var json     = JsonConvert.SerializeObject(response, Formatting.Indented);

            ShowResponseAndWait(json);
        }