コード例 #1
0
        public override void onMessage(QuickFix42.OrderCancelReject message, SessionID session)
        {
            OrderCancelReject reject = new OrderCancelReject();

            // required fields
            reject.TransactTime = Clock.Now;
            reject.OrderID = message.getOrderID().getValue();
            reject.ClOrdID = message.getClOrdID().getValue();
            reject.OrigClOrdID = message.getOrigClOrdID().getValue();

            (reject as FIXOrderCancelReject).OrdStatus = message.getOrdStatus().getValue();
            (reject as FIXOrderCancelReject).CxlRejResponseTo = message.getCxlRejResponseTo().getValue();
            (reject as FIXOrderCancelReject).CxlRejReason = message.getCxlRejReason().getValue();

            // optional fields
            if (message.isSetSecondaryOrderID())
                reject.SecondaryOrderID = message.getSecondaryOrderID().getValue();

            if (message.isSetAccount())
                reject.Account = message.getAccount().getValue();

            if (message.isSetText())
                reject.Text = message.getText().getValue();

            // event
            provider.EmitOrderCancelReject(reject);
        }