本文整理汇总了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);
}
示例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());
}
}
示例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());
}
}