void UpdateBalanceItem(BarItem item) { BalanceBase b = (BalanceBase)item.Tag; string text = b.Exchange + ": <b>" + b.Available.ToString("0.00000000") + "</b>"; item.Caption = text; }
public string CheckCreateDeposit(AccountInfo account, string currency) { BalanceBase b = account.Balances.FirstOrDefault(bb => bb.Currency == currency); if (!string.IsNullOrEmpty(b.DepositAddress)) { return(b.DepositAddress); } return(CreateDeposit(account, currency)); }
public double GetBalance(string currency) { try { if (Exchange.GetBalance(this, currency)) { BalanceBase res = Balances.FirstOrDefault(b => b.Currency == currency); return(res == null? 0: res.Available); } return(-1); } catch (Exception e) { Telemetry.Default.TrackException(e); return(-1); } }