public List <OptionOrderViewModel> PostOptionOrder(OptionOrderTicketViewModel[] orderTickets) { List <OptionOrderViewModel> results = new List <OptionOrderViewModel>(); foreach (OptionOrderTicketViewModel orderTicket in orderTickets) { OptionOrderArguments orderArguments = new OptionOrderArguments { CustomerAccountCode = FCIdentity.CustomerAccountCode, TradeAccount = FCIdentity.TradeAccount, OptionNumber = orderTicket.OptionNumber, SecurityCode = orderTicket.SecurityCode ?? orderTicket.UnderlyingCode, StockBusiness = StockBusiness.Parse(orderTicket.StockBusiness), StockBusinessAction = StockBusinessAction.Parse(orderTicket.OrderType), OrderQuantity = orderTicket.OrderQuantity, OrderPrice = orderTicket.OrderPrice, Password = FCUser.Password }; OptionOrderInformation order = _orderManager.SubmitOptionOrder(orderArguments); OptionOrderViewModel result = Mapper.Map <OptionOrderInformation, OptionOrderViewModel>(order); results.Add(result); } return(results); }
public object PostOpenOrdersMaxQuantity(OptionOrderTicketViewModel orderTicket) { string currentStockBusinessAction; if (orderTicket.OrderType != null) { currentStockBusinessAction = orderTicket.OrderType; } else { currentStockBusinessAction = "100"; } OptionOrderMaxQuantityArguments reqArguments = new OptionOrderMaxQuantityArguments { CustomerAccountCode = FCIdentity.CustomerAccountCode, TradeAccount = FCIdentity.TradeAccount, StockBusiness = StockBusiness.Parse(orderTicket.StockBusiness), StockBusinessAction = StockBusinessAction.Parse(currentStockBusinessAction), //行权与证券锁定解锁送100 //StockBusinessAction = StockBusinessAction.OrderDeclaration, OptionNumber = orderTicket.OptionNumber, SecurityCode = orderTicket.SecurityCode ?? orderTicket.UnderlyingCode, OrderPrice = orderTicket.OrderPrice }; OptionOrderMaxQuantityInformation result = _orderManager.GetOptionOrderMaxQuantity(reqArguments); return(result); }
public object GetOpenOrdersMaxQuantity(OptionOrderTicketViewModel orderTicket) { OptionOrderMaxQuantityArguments reqArguments = new OptionOrderMaxQuantityArguments { CustomerAccountCode = orderTicket.AccountCode, TradeAccount = orderTicket.TradeAccount, StockBusiness = StockBusiness.Parse(orderTicket.StockBusiness), StockBusinessAction = StockBusinessAction.Parse(orderTicket.OrderType), OptionNumber = orderTicket.OptionNumber, SecurityCode = orderTicket.UnderlyingCode, OrderPrice = orderTicket.OrderPrice }; OptionOrderMaxQuantityInformation result = _orderManager.GetOptionOrderMaxQuantity(reqArguments); return(result); }
public OptionOrderInformation PostOptionOrder(OptionOrderTicketViewModel orderTicket) { OptionOrderArguments orderArguments = new OptionOrderArguments { CustomerAccountCode = orderTicket.AccountCode, TradeAccount = orderTicket.TradeAccount, OptionNumber = orderTicket.OptionNumber, SecurityCode = orderTicket.UnderlyingCode, OrderQuantity = orderTicket.OrderQuantity, OrderPrice = orderTicket.OrderPrice, StockBusiness = StockBusiness.Parse(orderTicket.StockBusiness), StockBusinessAction = StockBusinessAction.Parse(orderTicket.OrderType), Password = orderTicket.Password, ClientInfo = orderTicket.ClientInfo }; OptionOrderInformation result = _orderManager.SubmitOptionOrder(orderArguments); return(result); }
public OptionOrderViewModel PostOptionOrder(OptionOrderTicketViewModel orderTicket) { OptionOrderArguments orderArguments = new OptionOrderArguments { CustomerAccountCode = FCIdentity.CustomerAccountCode, TradeAccount = FCIdentity.TradeAccount, OptionNumber = orderTicket.OptionNumber, SecurityCode = orderTicket.UnderlyingCode, StockBusiness = StockBusiness.Parse(orderTicket.StockBusiness), StockBusinessAction = StockBusinessAction.Parse(orderTicket.OrderType), OrderQuantity = orderTicket.OrderQuantity, OrderPrice = orderTicket.OrderPrice, InternalOrganization = Convert.ToString(FCUser.InternalOrganization), Password = FCUser.Password }; OptionOrderInformation order = _orderManager.SubmitOptionOrder(orderArguments); OptionOrderViewModel result = Mapper.Map <OptionOrderInformation, OptionOrderViewModel>(order); return(result); }