当前位置: 首页>>代码示例>>C#>>正文


C# QuickFix.IsSetOrderID方法代码示例

本文整理汇总了C#中QuickFix.IsSetOrderID方法的典型用法代码示例。如果您正苦于以下问题:C# QuickFix.IsSetOrderID方法的具体用法?C# QuickFix.IsSetOrderID怎么用?C# QuickFix.IsSetOrderID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QuickFix的用法示例。


在下文中一共展示了QuickFix.IsSetOrderID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetOrderIdFromMessage

        public static long GetOrderIdFromMessage(QuickFix.FIX44.OrderCancelRequest msg)
        {
            if (!msg.IsSetOrderID())
                throw new IncorrectTagValue(msg.OrderID.Tag);

            var idString = msg.OrderID.getValue();
            long id;
            if (!string.IsNullOrEmpty(idString) && long.TryParse(idString, out id))
            {
                return id;
            }

            throw new IncorrectTagValue(msg.OrderID.Tag);
        }
开发者ID:naziway,项目名称:testtask,代码行数:14,代码来源:TranslateFixMessages.cs

示例2: OnMessage

        public void OnMessage(QuickFix.FIX50.OrderCancelReplaceRequest msg, SessionID s)
        {
            string orderid = (msg.IsSetOrderID()) ? msg.OrderID.Obj : "unknown orderID";
            QuickFix.FIX50.OrderCancelReject ocj = new QuickFix.FIX50.OrderCancelReject(
                new OrderID(orderid), msg.ClOrdID, msg.OrigClOrdID, new OrdStatus(OrdStatus.REJECTED), new CxlRejResponseTo(CxlRejResponseTo.ORDER_CANCEL_REPLACE_REQUEST));
            ocj.CxlRejReason = new CxlRejReason(CxlRejReason.OTHER);
            ocj.Text = new Text("Executor does not support order cancel/replaces");

            try
            {
                Session.SendToTarget(ocj, s);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
开发者ID:BobRoss79,项目名称:quickfixn,代码行数:17,代码来源:Executor.cs

示例3: HandleExecutionReport

        public void HandleExecutionReport(QuickFix.FIX42.ExecutionReport msg)
        {
            try
            {
                string clOrdId = msg.ClOrdID.Obj;
                string status = FixEnumTranslator.Translate(msg.OrdStatus);

                Trace.WriteLine("OVM: Handling ExecutionReport: " + clOrdId + " / " + status);

                lock (_ordersLock)
                {
                    foreach (OrderRecord r in Orders)
                    {
                        if (r.ClOrdID == clOrdId)
                        {
                            r.Status = status;
                            if (msg.IsSetLastPx())
                                r.Price = msg.LastPx.Obj;
                            if (msg.IsSetOrderID())
                                r.OrderID = msg.OrderID.Obj;

                            return;
                        }
                    }
                }

                Trace.WriteLine("OVM: No order corresponds to ClOrdID '" + clOrdId + "'");
            }
            catch (Exception e)
            {
                Trace.WriteLine(e.ToString());
            }
        }
开发者ID:RJPalmer,项目名称:qfn_uidemo,代码行数:33,代码来源:OrderViewModel.cs


注:本文中的QuickFix.IsSetOrderID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。