protected override void ParseXmlMessage(string name) { base.ParseXmlMessage(MsgName); BrokerOrderId = FixmlUtil.ReadString(xml, "OrdID", true); BrokerOrderId2 = FixmlUtil.ReadString(xml, "OrdID2", true); ClientOrderId = FixmlUtil.ReadString(xml, "ID", true); StatusReqId = FixmlUtil.ReadString(xml, "StatReqID", true); ExecId = FixmlUtil.ReadString(xml, "ExecID"); ExecType = ExecRptTypeUtil.Read(xml, "ExecTyp", true); Status = ExecRptStatUtil.Read(xml, "Stat", true); RejectReason = OrderRejRsnUtil.Read(xml, "RejRsn", true); Account = FixmlUtil.ReadString(xml, "Acct", true); Instrument = FixmlInstrument.Read(xml, "Instrmt"); Side = OrderSideUtil.Read(xml, "Side"); Quantity = FixmlUtil.ReadUInt(xml, "OrdQty/Qty", true); Type = OrderTypeUtil.Read(xml, "OrdTyp", true); Price = FixmlUtil.ReadDecimal(xml, "Px", true); StopPrice = FixmlUtil.ReadDecimal(xml, "StopPx", true); Currency = FixmlUtil.ReadString(xml, "Ccy", true); TimeInForce = OrdTmInForceUtil.Read(xml, "TmInForce"); ExpireDate = FixmlUtil.ReadDateTime(xml, "ExpireDt", true); LastPrice = FixmlUtil.ReadDecimal(xml, "LastPx", true); LastQuantity = FixmlUtil.ReadUInt(Xml, "LastQty", true); LeavesQuantity = FixmlUtil.ReadUInt(xml, "LeavesQty", true); CumulatedQuantity = FixmlUtil.ReadUInt(xml, "CumQty", true); TransactionTime = FixmlUtil.ReadDateTime(xml, "TxnTm", true); Commission = FixmlUtil.ReadDecimal(xml, "Comm/Comm", true); CommissionType = OrdCommTypeUtil.Read(xml, "Comm/CommTyp", true); NetMoney = FixmlUtil.ReadDecimal(xml, "NetMny", true); MinimumQuantity = FixmlUtil.ReadUInt(xml, "MinQty", true); DisplayQuantity = FixmlUtil.ReadUInt(xml, "DsplyInstr/DisplayQty", true); Text = FixmlUtil.ReadString(xml, "Text", true); TriggerType = FixmlUtil.ReadChar(xml, "TrgrInstr/TrgrTyp", true); TriggerAction = FixmlUtil.ReadChar(xml, "TrgrInstr/TrgrActn", true); TriggerPrice = FixmlUtil.ReadDecimal(xml, "TrgrInstr/TrgrPx", true); TriggerPriceType = FixmlUtil.ReadChar(xml, "TrgrInstr/TrgrPxTyp", true); DeferredPaymentType = FixmlUtil.ReadChar(xml, "DefPayTyp", true); }
protected override void PrepareXmlMessage(string name) { base.PrepareXmlMessage("Order"); xml.SetAttribute("ID", ClientOrderId); if (TradeDate != null) { xml.SetAttribute("TrdDt", FixmlUtil.WriteDate((DateTime)TradeDate)); } if (Account != null) { xml.SetAttribute("Acct", Account); } if (MinimumQuantity != null) { xml.SetAttribute("MinQty", FixmlUtil.WriteDecimal(MinimumQuantity)); } if (DisplayQuantity != null) { AddElement(xml, "DsplyInstr").SetAttribute("DisplayQty", FixmlUtil.WriteDecimal(DisplayQuantity)); } if (Instrument != null) { Instrument.Write(xmlDoc, xml, "Instrmt"); } if (Side != null) { xml.SetAttribute("Side", OrderSideUtil.Write(Side)); } xml.SetAttribute("TxnTm", FixmlUtil.WriteDateTime(CreateTime)); AddElement(xml, "OrdQty").SetAttribute("Qty", Quantity.ToString()); xml.SetAttribute("OrdTyp", OrderTypeUtil.Write(Type)); if (Price != null) { xml.SetAttribute("Px", FixmlUtil.WriteDecimal(Price)); } if (StopPrice != null) { xml.SetAttribute("StopPx", FixmlUtil.WriteDecimal(StopPrice)); } if (Currency != null) { xml.SetAttribute("Ccy", Currency); } xml.SetAttribute("TmInForce", OrdTmInForceUtil.Write(TimeInForce)); if (ExpireDate != null) { xml.SetAttribute("ExpireDt", FixmlUtil.WriteDate((DateTime)ExpireDate)); } if (TriggerPrice != null) { XmlElement el = AddElement("TrgrInstr"); el.SetAttribute("TrgrTyp", TriggerType.ToString()); el.SetAttribute("TrgrActn", TriggerAction.ToString()); el.SetAttribute("TrgrPx", FixmlUtil.WriteDecimal(TriggerPrice)); el.SetAttribute("TrgrPxTyp", TriggerPriceType.ToString()); } if (DeferredPaymentType != null) { xml.SetAttribute("DefPayTyp", DeferredPaymentType.ToString()); } }