Ejemplo n.º 1
0
        public void GetDepositWithdrawHistoryTest(string type)
        {
            GetRequest request = new GetRequest();

            request.AddParam("type", type);

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

            Console.WriteLine(strret);
            Assert.Equal("ok", result.status);
        }
        private static void GetDepositWithdrawHistory()
        {
            var walletClient = new WalletClient(Config.AccessKey, Config.SecretKey);

            var request = new GetRequest()
                          .AddParam("type", "deposit");
            var result = walletClient.GetDepositWithdrawHistoryAsync(request).Result;

            if (result != null && result.data != null)
            {
                foreach (var h in result.data)
                {
                    Console.WriteLine($"type: {h.type}, currency: {h.currency}, amount: {h.amount}, updatedAt: {h.updatedAt}");
                }

                Console.WriteLine($"There are {result.data.Length} deposit and withdraw history");
            }
        }