protected override TraderResult internalGetTradingAccountInfo() { TraderResult result = new TraderResult(); result.Code = TraderResultEnum.SUCCESS; return result; }
protected override TraderResult internalGetTradingAccountInfo() { TraderResult result = new TraderResult(); result.Code = TraderResultEnum.SUCCESS; return(result); }
protected override TraderResult internalSellStock(string code, float price, int num) { Console.WriteLine(String.Format("卖出股票:{0}, 卖出价格:{1}: 卖出数量: {2}, 时间: {3}", code, price, num, DateTime.Now)); TraderResult result = new TraderResult(); result.Code = TraderResultEnum.SUCCESS; result.EntrustNo = new Random().Next(); return result; }
protected override TraderResult internalSellStock(string code, float price, int num) { Console.WriteLine(String.Format("卖出股票:{0}, 卖出价格:{1}: 卖出数量: {2}, 时间: {3}", code, price, num, DateTime.Now)); TraderResult result = new TraderResult(); result.Code = TraderResultEnum.SUCCESS; result.EntrustNo = new Random().Next(); return(result); }
public TraderResult CancelStock(int entrustNo) { TraderResult ret = internalCancelStock(entrustNo); switch (ret.Code) { case TraderResultEnum.TIMEOUT: return(CancelStock(entrustNo)); case TraderResultEnum.UNLOGIN: Login(); return(CancelStock(entrustNo)); case TraderResultEnum.ERROR: case TraderResultEnum.SUCCESS: return(ret); default: return(null); } }
public TraderResult BuyStock(string code, float price, int num) { TraderResult ret = internalBuyStock(code, price, num); switch (ret.Code) { case TraderResultEnum.TIMEOUT: return(BuyStock(code, price, num)); case TraderResultEnum.UNLOGIN: Login(); return(BuyStock(code, price, num)); case TraderResultEnum.ERROR: case TraderResultEnum.SUCCESS: return(ret); default: return(null); } }
public TraderResult GetTradingAccountInfo() { TraderResult ret = internalGetTradingAccountInfo(); switch (ret.Code) { case TraderResultEnum.TIMEOUT: return(GetTradingAccountInfo()); case TraderResultEnum.UNLOGIN: Login(); return(GetTradingAccountInfo()); case TraderResultEnum.ERROR: case TraderResultEnum.SUCCESS: return(ret); default: return(null); } }