Ejemplo n.º 1
0
        public void OnMessage(QuickFix.FIX43.OrderCancelReplaceRequest msg, SessionID s)
        {
            string orderid = (msg.IsSetOrderID()) ? msg.OrderID.Obj : "unknown orderID";

            QuickFix.FIX43.OrderCancelReject ocj = new QuickFix.FIX43.OrderCancelReject(
                new OrderID(orderid), msg.ClOrdID, msg.OrigClOrdID, new OrdStatus(OrdStatus.REJECTED), new CxlRejResponseTo(CxlRejResponseTo.ORDER_CANCEL_REPLACE_REQUEST));
            ocj.CxlRejReason = new CxlRejReason(CxlRejReason.UNKNOWN_ORDER);
            ocj.Text         = new Text("Executor does not support order cancel/replaces");

            try
            {
                Session.SendToTarget(ocj, s);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Ejemplo n.º 2
0
        private QuickFix.FIX43.OrderCancelReplaceRequest QueryCancelReplaceRequest43()
        {
            QuickFix.FIX43.OrderCancelReplaceRequest ocrr = new QuickFix.FIX43.OrderCancelReplaceRequest(
                QueryOrigClOrdID(),
                QueryClOrdID(),
                new HandlInst('1'),
                QuerySymbol(),
                QuerySide(),
                new TransactTime(DateTime.Now),
                QueryOrdType());

            if (QueryConfirm("New price"))
            {
                ocrr.Set(QueryPrice());
            }
            if (QueryConfirm("New quantity"))
            {
                ocrr.Set(QueryOrderQty());
            }

            QueryHeader(ocrr.Header);
            return(ocrr);
        }
Ejemplo n.º 3
0
        private QuickFix.FIX43.OrderCancelReplaceRequest QueryCancelReplaceRequest43()
        {
            QuickFix.FIX43.OrderCancelReplaceRequest ocrr = new QuickFix.FIX43.OrderCancelReplaceRequest(
                QueryOrigClOrdID(),
                QueryClOrdID(),
                new HandlInst('1'),
                QuerySymbol(),
                QuerySide(),
                new TransactTime(DateTime.Now),
                QueryOrdType());

            if (QueryConfirm("New price"))
                ocrr.Set(QueryPrice());
            if (QueryConfirm("New quantity"))
                ocrr.Set(QueryOrderQty());

            QueryHeader(ocrr.Header);
            return ocrr;
        }