ExecutionReport.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #ifndef FIX40_EXECUTIONREPORT_H
  2. #define FIX40_EXECUTIONREPORT_H
  3. #include "Message.h"
  4. namespace FIX40
  5. {
  6. class ExecutionReport : public Message
  7. {
  8. public:
  9. ExecutionReport() : Message(MsgType()) {}
  10. ExecutionReport(const FIX::Message& m) : Message(m) {}
  11. ExecutionReport(const Message& m) : Message(m) {}
  12. ExecutionReport(const ExecutionReport& m) : Message(m) {}
  13. static FIX::MsgType MsgType() { return FIX::MsgType("8"); }
  14. ExecutionReport(
  15. const FIX::OrderID& aOrderID,
  16. const FIX::ExecID& aExecID,
  17. const FIX::ExecTransType& aExecTransType,
  18. const FIX::OrdStatus& aOrdStatus,
  19. const FIX::Symbol& aSymbol,
  20. const FIX::Side& aSide,
  21. const FIX::OrderQty& aOrderQty,
  22. const FIX::LastShares& aLastShares,
  23. const FIX::LastPx& aLastPx,
  24. const FIX::CumQty& aCumQty,
  25. const FIX::AvgPx& aAvgPx )
  26. : Message(MsgType())
  27. {
  28. set(aOrderID);
  29. set(aExecID);
  30. set(aExecTransType);
  31. set(aOrdStatus);
  32. set(aSymbol);
  33. set(aSide);
  34. set(aOrderQty);
  35. set(aLastShares);
  36. set(aLastPx);
  37. set(aCumQty);
  38. set(aAvgPx);
  39. }
  40. FIELD_SET(*this, FIX::OrderID);
  41. FIELD_SET(*this, FIX::ClOrdID);
  42. FIELD_SET(*this, FIX::ClientID);
  43. FIELD_SET(*this, FIX::ExecBroker);
  44. FIELD_SET(*this, FIX::ListID);
  45. FIELD_SET(*this, FIX::ExecID);
  46. FIELD_SET(*this, FIX::ExecTransType);
  47. FIELD_SET(*this, FIX::ExecRefID);
  48. FIELD_SET(*this, FIX::OrdStatus);
  49. FIELD_SET(*this, FIX::OrdRejReason);
  50. FIELD_SET(*this, FIX::Account);
  51. FIELD_SET(*this, FIX::SettlmntTyp);
  52. FIELD_SET(*this, FIX::FutSettDate);
  53. FIELD_SET(*this, FIX::Symbol);
  54. FIELD_SET(*this, FIX::SymbolSfx);
  55. FIELD_SET(*this, FIX::SecurityID);
  56. FIELD_SET(*this, FIX::IDSource);
  57. FIELD_SET(*this, FIX::Issuer);
  58. FIELD_SET(*this, FIX::SecurityDesc);
  59. FIELD_SET(*this, FIX::Side);
  60. FIELD_SET(*this, FIX::OrderQty);
  61. FIELD_SET(*this, FIX::OrdType);
  62. FIELD_SET(*this, FIX::Price);
  63. FIELD_SET(*this, FIX::StopPx);
  64. FIELD_SET(*this, FIX::Currency);
  65. FIELD_SET(*this, FIX::TimeInForce);
  66. FIELD_SET(*this, FIX::ExpireTime);
  67. FIELD_SET(*this, FIX::ExecInst);
  68. FIELD_SET(*this, FIX::Rule80A);
  69. FIELD_SET(*this, FIX::LastShares);
  70. FIELD_SET(*this, FIX::LastPx);
  71. FIELD_SET(*this, FIX::LastMkt);
  72. FIELD_SET(*this, FIX::LastCapacity);
  73. FIELD_SET(*this, FIX::CumQty);
  74. FIELD_SET(*this, FIX::AvgPx);
  75. FIELD_SET(*this, FIX::TradeDate);
  76. FIELD_SET(*this, FIX::TransactTime);
  77. FIELD_SET(*this, FIX::ReportToExch);
  78. FIELD_SET(*this, FIX::Commission);
  79. FIELD_SET(*this, FIX::CommType);
  80. FIELD_SET(*this, FIX::NetMoney);
  81. FIELD_SET(*this, FIX::SettlCurrAmt);
  82. FIELD_SET(*this, FIX::SettlCurrency);
  83. FIELD_SET(*this, FIX::Text);
  84. FIELD_SET(*this, FIX::NoMiscFees);
  85. class NoMiscFees: public FIX::Group
  86. {
  87. public:
  88. NoMiscFees() : FIX::Group(136,137,FIX::message_order(137,138,139,0)) {}
  89. FIELD_SET(*this, FIX::MiscFeeAmt);
  90. FIELD_SET(*this, FIX::MiscFeeCurr);
  91. FIELD_SET(*this, FIX::MiscFeeType);
  92. };
  93. };
  94. }
  95. #endif