/// <summary> /// Trading action. /// </summary> /// <param name="tradeType">Trading type sell or buy</param> /// <param name="number">Number of trading action.</param> /// <returns>Result of trading</returns> public string Trade(TradeType tradeType, int number, List <IOption> options) { switch (tradeType) { case TradeType.Sell: trade = new SellTrading(); return(trade.Execute(SellRate, number, options)); case TradeType.Buy: trade = new BuyTrading(); return(trade.Execute(BuyRate, number, options)); default: return("Trade type is invalid"); } }