コード例 #1
0
        void UpdateBalanceItem(BarItem item)
        {
            BalanceBase b    = (BalanceBase)item.Tag;
            string      text = b.Exchange + ": <b>" + b.Available.ToString("0.00000000") + "</b>";

            item.Caption = text;
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 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);
     }
 }