private static void CryptocurrencyOhlcvHistorical() { Console.WriteLine("\nEnter symbol: "); var symbol = Console.ReadLine(); Console.WriteLine("\nEnter start date (YYYY-MM-DD):"); DateTime startDate; while (!DateTime.TryParse(Console.ReadLine(), out startDate)) { Console.WriteLine("\nInvalid date. Please enter a date using the format YYYY-MM-DD\nEnter start date: "); } Console.WriteLine("\nEnter end date (YYYY-MM-DD):"); DateTime endDate; while (!DateTime.TryParse(Console.ReadLine(), out endDate)) { Console.WriteLine("\nInvalid date. Please enter a date using the format YYYY-MM-DD\nEnter start date: "); } var client = new CryptocurrencyClient(ApiKey, Sandbox); var response = client.OhlcvHistoricalBySymbol(symbol, null, startDate, endDate); var json = JsonConvert.SerializeObject(response, Formatting.Indented); ShowResponseAndWait(json); }
private static void CryptocurrencyListingsLatest() { var client = new CryptocurrencyClient(ApiKey, Sandbox); var response = client.ListingsLatest(1, 10); var json = JsonConvert.SerializeObject(response, Formatting.Indented); ShowResponseAndWait(json); }
private static void CryptocurrencyPricePerformanceStatsLatest() { Console.WriteLine("\nEnter symbol: "); var symbol = Console.ReadLine(); var client = new CryptocurrencyClient(ApiKey, Sandbox); var response = client.PricePerformanceStatsBySymbol(symbol); var json = JsonConvert.SerializeObject(response, Formatting.Indented); ShowResponseAndWait(json); }
private static void CryptocurrencyOhlcvLatest() { Console.WriteLine("\nEnter symbol (separate by comma): "); var symbol = Console.ReadLine(); var client = new CryptocurrencyClient(ApiKey, Sandbox); var response = client.OhlcvLatestBySymbol(symbol); var json = JsonConvert.SerializeObject(response, Formatting.Indented); ShowResponseAndWait(json); }
private static void CryptocurrencyListingsHistorical() { Console.WriteLine("\nEnter 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 CryptocurrencyClient(ApiKey, Sandbox); var response = client.ListingsHistorical(date, 1, 1); var json = JsonConvert.SerializeObject(response, Formatting.Indented); ShowResponseAndWait(json); }