Exemplo n.º 1
0
        public PSIceOrder GetPSIceOrder(DbDataSet.额度分配Row rc, PSIceOrderType type, long price, int volume)
        {
            PSIceOrder order = new PSIceOrder();

            order.Market    = rc.市场 == 0 ? PSIceMarket.SZ : PSIceMarket.SH;
            order.OrderType = type;
            order.Code      = rc.证券代码;
            order.Price     = price;
            order.Volume    = volume;
            //order.BatchId = 0;
            //order.Node = _node;
            return(order);
        }
Exemplo n.º 2
0
        public int SendOrder(PSIceAccount account, PSIceOrder order, out PSIceOrderOut orderout, out PSIceErrorCode error)
        {
            var prx = GetTradeServant();

            try
            {
                if (prx != null)
                {
                    return(prx.SendOrder(account, order, out orderout, out error));
                }
            }
            catch (System.Exception ex)
            {
                Program.logger.LogInfo("顶点订单发送失败:{0}", ex.Message);
            }
            error    = new PSIceErrorCode(-1, "未知错误");
            orderout = null;
            return(0);
        }