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);
 }
Пример #2
0
 internal MDEntry(XmlElement inc)
 {
     //TODO: NOL3 na razie nie przesyła wcale pola "UpdtAct".
     UpdateAction = MDUpdateAction.Change;             //MDUpdateActionUtil.Read(inc, "UpdtAct");
     EntryType    = MDEntryTypeUtil.Read(inc, "Typ");
     Instrument   = FixmlInstrument.Read(inc, "Instrmt");
     if (EntryType.In(MDEntryTypes.HasPrice))
     {
         PriceStr = FixmlUtil.ReadString(inc, "Px");
         if (!(new[] { "PKC", "PCR", "PCRO" }).Contains(PriceStr))
         {
             Price = FixmlUtil.ReadDecimal(inc, "Px");
         }
     }
     if (EntryType.In(MDEntryTypes.HasCurrency))
     {
         Currency = FixmlUtil.ReadString(inc, "CCy");
     }
     if (EntryType.In(MDEntryTypes.HasSize))
     {
         try { Size = FixmlUtil.ReadUInt(inc, "Sz"); }
         catch (FixmlException e) { e.PrintWarning(); }
     }
     if (EntryType.In(MDEntryTypes.HasTurnover))
     {
         Turnover = FixmlUtil.ReadDecimal(inc, "Tov", EntryType.In(MDEntryTypes.OpenClose));
     }
     if (EntryType.In(MDEntryTypes.BasicBook))
     {
         Level  = FixmlUtil.ReadUInt(inc, "MDPxLvl");
         Orders = FixmlUtil.ReadUInt(inc, "NumOfOrds");
     }
     if (EntryType == MDEntryType.Trade)
     {
         DateTime = FixmlUtil.ReadDateTime(inc, "Dt", "Tm");
     }
 }