public void GetBalances_HideZeros_Test() { var hideZeros = true; var balances = _service.GetBalances(hideZeros).Result; Assert.NotNull(balances); }
/// <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()); }
/// <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)); }
/// <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)); }
/// <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)); }