Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        public OptionOrderInformation ExerciseOptionPosition(OptionOrderTicketViewModel orderTicket)
        {
            OptionOrderArguments orderArguments = new OptionOrderArguments
            {
                CustomerAccountCode = orderTicket.AccountCode,
                TradeAccount        = orderTicket.TradeAccount,
                OptionNumber        = orderTicket.OptionNumber,
                OrderQuantity       = orderTicket.OrderQuantity,
                StockBusiness       = StockBusiness.Parse(orderTicket.StockBusiness),
                StockBusinessAction = StockBusinessAction.OrderDeclaration,
                Password            = orderTicket.Password,
                ClientInfo          = orderTicket.ClientInfo
            };

            OptionOrderInformation result = _orderManager.SubmitOptionOrder(orderArguments);

            return(result);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        public OptionOrderViewModel PostExerciseOptionPosition(OptionOrderTicketViewModel orderTicket)
        {
            OptionOrderArguments orderArguments = new OptionOrderArguments
            {
                CustomerAccountCode = FCIdentity.CustomerAccountCode,
                TradeAccount        = FCIdentity.TradeAccount,
                OptionNumber        = orderTicket.OptionNumber,//11000033
                OrderQuantity       = orderTicket.OrderQuantity,
                StockBusiness       = StockBusiness.Parse(orderTicket.StockBusiness),
                //StockBusiness = StockBusiness.ExerciseCallOption,
                StockBusinessAction  = StockBusinessAction.OrderDeclaration,
                Password             = FCUser.Password,
                InternalOrganization = Convert.ToString(FCUser.InternalOrganization)
            };

            OptionOrderInformation order = _orderManager.SubmitOptionOrder(orderArguments);

            OptionOrderViewModel result = Mapper.Map <OptionOrderInformation, OptionOrderViewModel>(order);

            return(result);
        }
Ejemplo n.º 7
0
        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);
        }