Ejemplo n.º 1
0
        private SendReply Send(SendChildOrderParam param)
        {
            var method = "POST";
            var path   = "/v1/me/sendchildorder";
            var body   = JsonConvert.SerializeObject(param);
            var req    = BuildRequest(path, method, body);

            return(RestUtil.ExecuteRequest <SendReply>(_restClient, req));
        }
Ejemplo n.º 2
0
        public void Send(Order order)
        {
            if (order.Broker != Broker)
            {
                throw new InvalidOperationException();
            }

            var param = new SendChildOrderParam(order);
            var reply = Send(param);

            order.BrokerOrderId = reply.ChildOrderAcceptanceId;
            order.Status        = OrderStatus.New;
            order.SentTime      = DateTime.Now;
            order.LastUpdated   = DateTime.Now;
        }