Пример #1
0
        public void GetWithdrawAddressTest(string currency)
        {
            GetRequest request = new GetRequest();

            request.AddParam("currency", currency);

            GetDepositAddressResponse result = client.GetWithdrawAddressAsync(request).Result;
            string strret = JsonConvert.SerializeObject(result, Formatting.Indented);

            Console.WriteLine(strret);
            Assert.Equal(200, result.code);
        }
        private static void GetWithdrawAddress()
        {
            var walletClient = new WalletClient(Config.AccessKey, Config.SecretKey);

            _logger.Start();
            var request = new GetRequest()
                          .AddParam("currency", "btc");

            var result = walletClient.GetWithdrawAddressAsync(request).Result;

            _logger.StopAndLog();

            if (result != null && result.data != null)
            {
                AppLogger.Info($"Get withdraw address, count={result.data.Length}");
                foreach (var a in result.data)
                {
                    AppLogger.Info($"currency: {a.currency}, addr: {a.address}, chain: {a.chain}");
                }
            }
        }