public void GetBalances_HideZeros_Test()
        {
            var hideZeros = true;
            var balances  = _service.GetBalances(hideZeros).Result;

            Assert.NotNull(balances);
        }
Example #2
0
        /// <summary>
        /// Get all account balances
        /// </summary>
        /// <param name="hideZeroBalance">Hide zero balance coins</param>
        /// <returns>Balance collection</returns>
        public static async Task <List <Balance> > GetBalances(this IKuCoinDotNet service, bool hideZeroBalance = false)
        {
            var balances = await service.GetBalances(string.Empty, null);

            return(hideZeroBalance
                ? balances.Where(b => b.Total > 0).Distinct().ToList()
                : balances.Distinct().ToList());
        }
Example #3
0
 /// <summary>
 /// Get account balance
 /// </summary>
 /// <param name="type">Account type</param>
 /// <returns>Balance collection</returns>
 public static async Task <List <Balance> > GetBalances(this IKuCoinDotNet service, AccountType type)
 {
     return(await service.GetBalances(string.Empty, type));
 }
Example #4
0
 /// <summary>
 /// Get account balance
 /// </summary>
 /// <param name="symbol">Symbol of currency</param>
 /// <returns>Balance collection</returns>
 public static async Task <List <Balance> > GetBalances(this IKuCoinDotNet service, string symbol)
 {
     return(await service.GetBalances(symbol, null));
 }
Example #5
0
 /// <summary>
 /// Get account balance
 /// </summary>
 /// <returns>Balance collection</returns>
 public static async Task <List <Balance> > GetBalances(this IKuCoinDotNet service)
 {
     return(await service.GetBalances(string.Empty, null));
 }