Пример #1
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public Balance(MainCryptos ccyBase, MainCryptos ccyPair)
 {
     this.cryptoTrader  = new My_CryptoTrader.My_CryptoTrader();
     this.ccyBase       = ccyBase;
     this.ccyPair       = ccyPair;
     this.amount        = 0;
     this.totalValueBTC = 0;
     this.totalValueUSD = 0;
     this.ccyUSDPrice   = 0;
     this.BTCUSDPrice   = 0;
 }
Пример #2
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public Balance(MainCryptos ccyBase, MainCryptos ccyPair, double amount)
        {
            this.cryptoTrader = new My_CryptoTrader.My_CryptoTrader();
            this.ccyBase      = ccyBase;
            this.ccyPair      = ccyPair;
            this.amount       = amount;
            this.ccyUSDPrice  = this.cryptoTrader.GetSpotPrice(this.ccyBase.ToString());
            this.BTCUSDPrice  = this.cryptoTrader.GetSpotPrice(MainCryptos.BTC.ToString());

            this.totalValueUSD = amount * this.ccyUSDPrice;
            this.totalValueBTC = (amount * this.ccyUSDPrice) / (this.BTCUSDPrice);
        }
Пример #3
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public Order(Exchanges exchange, OrderType side, OrderStyle style, bool success, MainCryptos ccyBase, MainCryptos ccyPair)
 {
     cryptoTrader    = new My_CryptoTrader.My_CryptoTrader();
     this.exchange   = exchange;
     this.side       = side;
     this.style      = style;
     this.success    = success;
     this.ccyPair    = ccyPair;
     this.ccyBase    = ccyBase;
     this.amount     = 0;
     this.orderPrice = new Price(error: true);
     this.message    = "";
     this.ID         = "";
     this.valueBTC   = 0;
     this.valueUSD   = 0;
 }
Пример #4
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public Order(Exchanges exchange, OrderType side)
 {
     cryptoTrader    = new My_CryptoTrader.My_CryptoTrader();
     this.exchange   = exchange;
     this.side       = side;
     this.style      = OrderStyle.LIMIT;
     this.success    = false;
     this.ccyPair    = MainCryptos.USDT;
     this.ccyBase    = MainCryptos.BTC;
     this.amount     = 0;
     this.orderPrice = new Price(error: true);
     this.message    = "";
     this.ID         = "";
     this.valueBTC   = 0;
     this.valueUSD   = 0;
 }