private void CheckCurrentlyBuying() { if (_BitrexService.GetOrderIsComplete(_OrderNumber)) { _OrderStatus = PLANINGTOSELL; _CurrentBalance = _BitrexService.GetBalance(_Market.Split('-')[1]); Console.WriteLine("finished Buy Quantity: " + _CurrentBalance.ToString() + " Estimated usd worth: $" + (_CurrentBalance * _TempTransactionPrice).ToString()); } }
public TradingLogicManager(string market, IBittrexService bittrexService, string orderStatus) { _BitrexService = bittrexService; _Market = market; _CurrentPrice = _BitrexService.GetCurrentPrice(_Market); _LastTransactionPrice = _CurrentPrice.Last; _OrderStatus = orderStatus; if (_OrderStatus == PLANINGTOBUY) { //get base coin _CurrentBalance = _BitrexService.GetBalance(_Market.Split('-')[0]); } else { //get Alt Coin _CurrentBalance = _BitrexService.GetBalance(_Market.Split('-')[1]); } _CurrentTrend = new List <CurrentPriceModel>(); _LastCurrentPrice = _CurrentPrice; for (int i = 0; i < 20; i++) { _CurrentTrend.Add(new CurrentPriceModel(_CurrentPrice.Last, _CurrentPrice.Bid, _CurrentPrice.Ask, _CurrentPrice.Avg)); } }