private static void GetStableCoin() { var stableCoinClient = new StableCointClient(Config.AccessKey, Config.SecretKey); _logger.Start(); var result = stableCoinClient.GetStableCoinAsync("tusd", "1000", "sell").Result; _logger.StopAndLog(); if (result != null) { switch (result.status) { case "ok": { var d = result.data; AppLogger.Info($"Get stable coin successfully, quoteId: {d.quoteId}, currency: {d.currency}, amount: {d.amount}, fee: {d.exchangeFee}"); break; } case "error": { AppLogger.Info($"Get stable coin fail, error code: {result.errorCode}, error message: {result.errorMessage}"); break; } } } }
private static void GetStableCoin() { var stableCoinClient = new StableCointClient(Config.AccessKey, Config.SecretKey); var response = stableCoinClient.GetStableCoinAsync("usdt", "10", "sell").Result; if (response != null) { switch (response.status) { case "ok": { Console.WriteLine($"Get stable coin successfully"); break; } case "error": { Console.WriteLine($"Get stable coin fail, error code: {response.errorCode}, error message: {response.errorMessage}"); break; } } } }