Beispiel #1
0
 protected bool BuyBaseByUsdt(double price, double amount)
 {
     if (BaseUsdt.Buy(price, amount) == null)
     {
         LogManager.Default.AddError("usdt -> base fail. " + ToString());
         Debug.WriteLine("usdt -> base fail.");
         return(false);
     }
     Debug.WriteLine("usdt -> base succes.");
     return(true);
 }
Beispiel #2
0
 protected bool UpdateBaseBalance()
 {
     for (int i = 0; i < 3; i++)
     {
         if (BaseUsdt.UpdateBalance(BaseUsdt.MarketCurrency))
         {
             if (IsSelected)
             {
                 Debug.WriteLine("update base balance succes. " + BaseBalanceInfo.Available.ToString("0.00000000"));
             }
             return(true);
         }
     }
     if (IsSelected)
     {
         Debug.WriteLine("update base balabce fail. " + BaseBalanceInfo.Available.ToString("0.00000000"));
         LogManager.Default.Error("update base balance fail. " + ToString());
     }
     return(false);
 }