PositionReport.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. #ifndef FIX50SP1_POSITIONREPORT_H
  2. #define FIX50SP1_POSITIONREPORT_H
  3. #include "Message.h"
  4. namespace FIX50SP1
  5. {
  6. class PositionReport : public Message
  7. {
  8. public:
  9. PositionReport() : Message(MsgType()) {}
  10. PositionReport(const FIX::Message& m) : Message(m) {}
  11. PositionReport(const Message& m) : Message(m) {}
  12. PositionReport(const PositionReport& m) : Message(m) {}
  13. static FIX::MsgType MsgType() { return FIX::MsgType("AP"); }
  14. PositionReport(
  15. const FIX::PosMaintRptID& aPosMaintRptID,
  16. const FIX::ClearingBusinessDate& aClearingBusinessDate )
  17. : Message(MsgType())
  18. {
  19. set(aPosMaintRptID);
  20. set(aClearingBusinessDate);
  21. }
  22. FIELD_SET(*this, FIX::ApplID);
  23. FIELD_SET(*this, FIX::ApplSeqNum);
  24. FIELD_SET(*this, FIX::ApplLastSeqNum);
  25. FIELD_SET(*this, FIX::ApplResendFlag);
  26. FIELD_SET(*this, FIX::PosMaintRptID);
  27. FIELD_SET(*this, FIX::PosReqID);
  28. FIELD_SET(*this, FIX::PosReqType);
  29. FIELD_SET(*this, FIX::SubscriptionRequestType);
  30. FIELD_SET(*this, FIX::TotalNumPosReports);
  31. FIELD_SET(*this, FIX::PosReqResult);
  32. FIELD_SET(*this, FIX::UnsolicitedIndicator);
  33. FIELD_SET(*this, FIX::ClearingBusinessDate);
  34. FIELD_SET(*this, FIX::SettlSessID);
  35. FIELD_SET(*this, FIX::SettlSessSubID);
  36. FIELD_SET(*this, FIX::PriceType);
  37. FIELD_SET(*this, FIX::SettlCurrency);
  38. FIELD_SET(*this, FIX::MessageEventSource);
  39. FIELD_SET(*this, FIX::NoPartyIDs);
  40. class NoPartyIDs: public FIX::Group
  41. {
  42. public:
  43. NoPartyIDs() : FIX::Group(453,448,FIX::message_order(448,447,452,802,0)) {}
  44. FIELD_SET(*this, FIX::PartyID);
  45. FIELD_SET(*this, FIX::PartyIDSource);
  46. FIELD_SET(*this, FIX::PartyRole);
  47. FIELD_SET(*this, FIX::NoPartySubIDs);
  48. class NoPartySubIDs: public FIX::Group
  49. {
  50. public:
  51. NoPartySubIDs() : FIX::Group(802,523,FIX::message_order(523,803,0)) {}
  52. FIELD_SET(*this, FIX::PartySubID);
  53. FIELD_SET(*this, FIX::PartySubIDType);
  54. };
  55. };
  56. FIELD_SET(*this, FIX::Account);
  57. FIELD_SET(*this, FIX::AcctIDSource);
  58. FIELD_SET(*this, FIX::AccountType);
  59. FIELD_SET(*this, FIX::Symbol);
  60. FIELD_SET(*this, FIX::SymbolSfx);
  61. FIELD_SET(*this, FIX::SecurityID);
  62. FIELD_SET(*this, FIX::SecurityIDSource);
  63. FIELD_SET(*this, FIX::Product);
  64. FIELD_SET(*this, FIX::ProductComplex);
  65. FIELD_SET(*this, FIX::SecurityGroup);
  66. FIELD_SET(*this, FIX::CFICode);
  67. FIELD_SET(*this, FIX::SecurityType);
  68. FIELD_SET(*this, FIX::SecuritySubType);
  69. FIELD_SET(*this, FIX::MaturityMonthYear);
  70. FIELD_SET(*this, FIX::MaturityDate);
  71. FIELD_SET(*this, FIX::MaturityTime);
  72. FIELD_SET(*this, FIX::SettleOnOpenFlag);
  73. FIELD_SET(*this, FIX::InstrmtAssignmentMethod);
  74. FIELD_SET(*this, FIX::SecurityStatus);
  75. FIELD_SET(*this, FIX::CouponPaymentDate);
  76. FIELD_SET(*this, FIX::IssueDate);
  77. FIELD_SET(*this, FIX::RepoCollateralSecurityType);
  78. FIELD_SET(*this, FIX::RepurchaseTerm);
  79. FIELD_SET(*this, FIX::RepurchaseRate);
  80. FIELD_SET(*this, FIX::Factor);
  81. FIELD_SET(*this, FIX::CreditRating);
  82. FIELD_SET(*this, FIX::InstrRegistry);
  83. FIELD_SET(*this, FIX::CountryOfIssue);
  84. FIELD_SET(*this, FIX::StateOrProvinceOfIssue);
  85. FIELD_SET(*this, FIX::LocaleOfIssue);
  86. FIELD_SET(*this, FIX::RedemptionDate);
  87. FIELD_SET(*this, FIX::StrikePrice);
  88. FIELD_SET(*this, FIX::StrikeCurrency);
  89. FIELD_SET(*this, FIX::StrikeMultiplier);
  90. FIELD_SET(*this, FIX::StrikeValue);
  91. FIELD_SET(*this, FIX::OptAttribute);
  92. FIELD_SET(*this, FIX::ContractMultiplier);
  93. FIELD_SET(*this, FIX::MinPriceIncrement);
  94. FIELD_SET(*this, FIX::MinPriceIncrementAmount);
  95. FIELD_SET(*this, FIX::UnitOfMeasure);
  96. FIELD_SET(*this, FIX::UnitOfMeasureQty);
  97. FIELD_SET(*this, FIX::PriceUnitOfMeasure);
  98. FIELD_SET(*this, FIX::PriceUnitOfMeasureQty);
  99. FIELD_SET(*this, FIX::SettlMethod);
  100. FIELD_SET(*this, FIX::ExerciseStyle);
  101. FIELD_SET(*this, FIX::OptPayAmount);
  102. FIELD_SET(*this, FIX::PriceQuoteMethod);
  103. FIELD_SET(*this, FIX::FuturesValuationMethod);
  104. FIELD_SET(*this, FIX::ListMethod);
  105. FIELD_SET(*this, FIX::CapPrice);
  106. FIELD_SET(*this, FIX::FloorPrice);
  107. FIELD_SET(*this, FIX::PutOrCall);
  108. FIELD_SET(*this, FIX::FlexibleIndicator);
  109. FIELD_SET(*this, FIX::FlexProductEligibilityIndicator);
  110. FIELD_SET(*this, FIX::TimeUnit);
  111. FIELD_SET(*this, FIX::CouponRate);
  112. FIELD_SET(*this, FIX::SecurityExchange);
  113. FIELD_SET(*this, FIX::PositionLimit);
  114. FIELD_SET(*this, FIX::NTPositionLimit);
  115. FIELD_SET(*this, FIX::Issuer);
  116. FIELD_SET(*this, FIX::EncodedIssuerLen);
  117. FIELD_SET(*this, FIX::EncodedIssuer);
  118. FIELD_SET(*this, FIX::SecurityDesc);
  119. FIELD_SET(*this, FIX::EncodedSecurityDescLen);
  120. FIELD_SET(*this, FIX::EncodedSecurityDesc);
  121. FIELD_SET(*this, FIX::Pool);
  122. FIELD_SET(*this, FIX::ContractSettlMonth);
  123. FIELD_SET(*this, FIX::CPProgram);
  124. FIELD_SET(*this, FIX::CPRegType);
  125. FIELD_SET(*this, FIX::DatedDate);
  126. FIELD_SET(*this, FIX::InterestAccrualDate);
  127. FIELD_SET(*this, FIX::Currency);
  128. FIELD_SET(*this, FIX::SettlPrice);
  129. FIELD_SET(*this, FIX::SettlPriceType);
  130. FIELD_SET(*this, FIX::PriorSettlPrice);
  131. FIELD_SET(*this, FIX::MatchStatus);
  132. FIELD_SET(*this, FIX::NoLegs);
  133. class NoLegs: public FIX::Group
  134. {
  135. public:
  136. NoLegs() : FIX::Group(555,600,FIX::message_order(600,601,602,603,607,608,609,764,610,611,1212,248,249,250,251,252,253,257,599,596,597,598,254,612,942,613,614,999,1224,1421,1422,1001,1420,615,616,617,618,619,620,621,622,623,624,556,740,739,955,956,1358,1017,0)) {}
  137. FIELD_SET(*this, FIX::LegSymbol);
  138. FIELD_SET(*this, FIX::LegSymbolSfx);
  139. FIELD_SET(*this, FIX::LegSecurityID);
  140. FIELD_SET(*this, FIX::LegSecurityIDSource);
  141. FIELD_SET(*this, FIX::LegProduct);
  142. FIELD_SET(*this, FIX::LegCFICode);
  143. FIELD_SET(*this, FIX::LegSecurityType);
  144. FIELD_SET(*this, FIX::LegSecuritySubType);
  145. FIELD_SET(*this, FIX::LegMaturityMonthYear);
  146. FIELD_SET(*this, FIX::LegMaturityDate);
  147. FIELD_SET(*this, FIX::LegMaturityTime);
  148. FIELD_SET(*this, FIX::LegCouponPaymentDate);
  149. FIELD_SET(*this, FIX::LegIssueDate);
  150. FIELD_SET(*this, FIX::LegRepoCollateralSecurityType);
  151. FIELD_SET(*this, FIX::LegRepurchaseTerm);
  152. FIELD_SET(*this, FIX::LegRepurchaseRate);
  153. FIELD_SET(*this, FIX::LegFactor);
  154. FIELD_SET(*this, FIX::LegCreditRating);
  155. FIELD_SET(*this, FIX::LegInstrRegistry);
  156. FIELD_SET(*this, FIX::LegCountryOfIssue);
  157. FIELD_SET(*this, FIX::LegStateOrProvinceOfIssue);
  158. FIELD_SET(*this, FIX::LegLocaleOfIssue);
  159. FIELD_SET(*this, FIX::LegRedemptionDate);
  160. FIELD_SET(*this, FIX::LegStrikePrice);
  161. FIELD_SET(*this, FIX::LegStrikeCurrency);
  162. FIELD_SET(*this, FIX::LegOptAttribute);
  163. FIELD_SET(*this, FIX::LegContractMultiplier);
  164. FIELD_SET(*this, FIX::LegUnitOfMeasure);
  165. FIELD_SET(*this, FIX::LegUnitOfMeasureQty);
  166. FIELD_SET(*this, FIX::LegPriceUnitOfMeasure);
  167. FIELD_SET(*this, FIX::LegPriceUnitOfMeasureQty);
  168. FIELD_SET(*this, FIX::LegTimeUnit);
  169. FIELD_SET(*this, FIX::LegExerciseStyle);
  170. FIELD_SET(*this, FIX::LegCouponRate);
  171. FIELD_SET(*this, FIX::LegSecurityExchange);
  172. FIELD_SET(*this, FIX::LegIssuer);
  173. FIELD_SET(*this, FIX::EncodedLegIssuerLen);
  174. FIELD_SET(*this, FIX::EncodedLegIssuer);
  175. FIELD_SET(*this, FIX::LegSecurityDesc);
  176. FIELD_SET(*this, FIX::EncodedLegSecurityDescLen);
  177. FIELD_SET(*this, FIX::EncodedLegSecurityDesc);
  178. FIELD_SET(*this, FIX::LegRatioQty);
  179. FIELD_SET(*this, FIX::LegSide);
  180. FIELD_SET(*this, FIX::LegCurrency);
  181. FIELD_SET(*this, FIX::LegPool);
  182. FIELD_SET(*this, FIX::LegDatedDate);
  183. FIELD_SET(*this, FIX::LegContractSettlMonth);
  184. FIELD_SET(*this, FIX::LegInterestAccrualDate);
  185. FIELD_SET(*this, FIX::LegPutOrCall);
  186. FIELD_SET(*this, FIX::LegOptionRatio);
  187. };
  188. FIELD_SET(*this, FIX::NoUnderlyings);
  189. class NoUnderlyings: public FIX::Group
  190. {
  191. public:
  192. NoUnderlyings() : FIX::Group(711,311,FIX::message_order(311,312,309,305,462,463,310,763,313,542,1213,241,242,243,244,245,246,256,595,592,593,594,247,316,941,317,436,998,1423,1424,1425,1000,1419,435,308,306,362,363,307,364,365,877,878,972,318,879,975,973,974,810,882,883,884,885,886,1044,1045,1046,1038,1039,315,732,733,1037,984,0)) {}
  193. FIELD_SET(*this, FIX::UnderlyingSymbol);
  194. FIELD_SET(*this, FIX::UnderlyingSymbolSfx);
  195. FIELD_SET(*this, FIX::UnderlyingSecurityID);
  196. FIELD_SET(*this, FIX::UnderlyingSecurityIDSource);
  197. FIELD_SET(*this, FIX::UnderlyingProduct);
  198. FIELD_SET(*this, FIX::UnderlyingCFICode);
  199. FIELD_SET(*this, FIX::UnderlyingSecurityType);
  200. FIELD_SET(*this, FIX::UnderlyingSecuritySubType);
  201. FIELD_SET(*this, FIX::UnderlyingMaturityMonthYear);
  202. FIELD_SET(*this, FIX::UnderlyingMaturityDate);
  203. FIELD_SET(*this, FIX::UnderlyingMaturityTime);
  204. FIELD_SET(*this, FIX::UnderlyingCouponPaymentDate);
  205. FIELD_SET(*this, FIX::UnderlyingIssueDate);
  206. FIELD_SET(*this, FIX::UnderlyingRepoCollateralSecurityType);
  207. FIELD_SET(*this, FIX::UnderlyingRepurchaseTerm);
  208. FIELD_SET(*this, FIX::UnderlyingRepurchaseRate);
  209. FIELD_SET(*this, FIX::UnderlyingFactor);
  210. FIELD_SET(*this, FIX::UnderlyingCreditRating);
  211. FIELD_SET(*this, FIX::UnderlyingInstrRegistry);
  212. FIELD_SET(*this, FIX::UnderlyingCountryOfIssue);
  213. FIELD_SET(*this, FIX::UnderlyingStateOrProvinceOfIssue);
  214. FIELD_SET(*this, FIX::UnderlyingLocaleOfIssue);
  215. FIELD_SET(*this, FIX::UnderlyingRedemptionDate);
  216. FIELD_SET(*this, FIX::UnderlyingStrikePrice);
  217. FIELD_SET(*this, FIX::UnderlyingStrikeCurrency);
  218. FIELD_SET(*this, FIX::UnderlyingOptAttribute);
  219. FIELD_SET(*this, FIX::UnderlyingContractMultiplier);
  220. FIELD_SET(*this, FIX::UnderlyingUnitOfMeasure);
  221. FIELD_SET(*this, FIX::UnderlyingUnitOfMeasureQty);
  222. FIELD_SET(*this, FIX::UnderlyingPriceUnitOfMeasure);
  223. FIELD_SET(*this, FIX::UnderlyingPriceUnitOfMeasureQty);
  224. FIELD_SET(*this, FIX::UnderlyingTimeUnit);
  225. FIELD_SET(*this, FIX::UnderlyingExerciseStyle);
  226. FIELD_SET(*this, FIX::UnderlyingCouponRate);
  227. FIELD_SET(*this, FIX::UnderlyingSecurityExchange);
  228. FIELD_SET(*this, FIX::UnderlyingIssuer);
  229. FIELD_SET(*this, FIX::EncodedUnderlyingIssuerLen);
  230. FIELD_SET(*this, FIX::EncodedUnderlyingIssuer);
  231. FIELD_SET(*this, FIX::UnderlyingSecurityDesc);
  232. FIELD_SET(*this, FIX::EncodedUnderlyingSecurityDescLen);
  233. FIELD_SET(*this, FIX::EncodedUnderlyingSecurityDesc);
  234. FIELD_SET(*this, FIX::UnderlyingCPProgram);
  235. FIELD_SET(*this, FIX::UnderlyingCPRegType);
  236. FIELD_SET(*this, FIX::UnderlyingAllocationPercent);
  237. FIELD_SET(*this, FIX::UnderlyingCurrency);
  238. FIELD_SET(*this, FIX::UnderlyingQty);
  239. FIELD_SET(*this, FIX::UnderlyingSettlementType);
  240. FIELD_SET(*this, FIX::UnderlyingCashAmount);
  241. FIELD_SET(*this, FIX::UnderlyingCashType);
  242. FIELD_SET(*this, FIX::UnderlyingPx);
  243. FIELD_SET(*this, FIX::UnderlyingDirtyPrice);
  244. FIELD_SET(*this, FIX::UnderlyingEndPrice);
  245. FIELD_SET(*this, FIX::UnderlyingStartValue);
  246. FIELD_SET(*this, FIX::UnderlyingCurrentValue);
  247. FIELD_SET(*this, FIX::UnderlyingEndValue);
  248. FIELD_SET(*this, FIX::UnderlyingAdjustedQuantity);
  249. FIELD_SET(*this, FIX::UnderlyingFXRate);
  250. FIELD_SET(*this, FIX::UnderlyingFXRateCalc);
  251. FIELD_SET(*this, FIX::UnderlyingCapValue);
  252. FIELD_SET(*this, FIX::UnderlyingSettlMethod);
  253. FIELD_SET(*this, FIX::UnderlyingPutOrCall);
  254. FIELD_SET(*this, FIX::UnderlyingSettlPrice);
  255. FIELD_SET(*this, FIX::UnderlyingSettlPriceType);
  256. FIELD_SET(*this, FIX::UnderlyingDeliveryAmount);
  257. FIELD_SET(*this, FIX::NoUnderlyingAmounts);
  258. class NoUnderlyingAmounts: public FIX::Group
  259. {
  260. public:
  261. NoUnderlyingAmounts() : FIX::Group(984,985,FIX::message_order(985,986,987,988,0)) {}
  262. FIELD_SET(*this, FIX::UnderlyingPayAmount);
  263. FIELD_SET(*this, FIX::UnderlyingCollectAmount);
  264. FIELD_SET(*this, FIX::UnderlyingSettlementDate);
  265. FIELD_SET(*this, FIX::UnderlyingSettlementStatus);
  266. };
  267. };
  268. FIELD_SET(*this, FIX::NoPositions);
  269. class NoPositions: public FIX::Group
  270. {
  271. public:
  272. NoPositions() : FIX::Group(702,703,FIX::message_order(703,704,705,706,976,539,0)) {}
  273. FIELD_SET(*this, FIX::PosType);
  274. FIELD_SET(*this, FIX::LongQty);
  275. FIELD_SET(*this, FIX::ShortQty);
  276. FIELD_SET(*this, FIX::PosQtyStatus);
  277. FIELD_SET(*this, FIX::QuantityDate);
  278. FIELD_SET(*this, FIX::NoNestedPartyIDs);
  279. class NoNestedPartyIDs: public FIX::Group
  280. {
  281. public:
  282. NoNestedPartyIDs() : FIX::Group(539,524,FIX::message_order(524,525,538,804,0)) {}
  283. FIELD_SET(*this, FIX::NestedPartyID);
  284. FIELD_SET(*this, FIX::NestedPartyIDSource);
  285. FIELD_SET(*this, FIX::NestedPartyRole);
  286. FIELD_SET(*this, FIX::NoNestedPartySubIDs);
  287. class NoNestedPartySubIDs: public FIX::Group
  288. {
  289. public:
  290. NoNestedPartySubIDs() : FIX::Group(804,545,FIX::message_order(545,805,0)) {}
  291. FIELD_SET(*this, FIX::NestedPartySubID);
  292. FIELD_SET(*this, FIX::NestedPartySubIDType);
  293. };
  294. };
  295. };
  296. FIELD_SET(*this, FIX::NoPosAmt);
  297. class NoPosAmt: public FIX::Group
  298. {
  299. public:
  300. NoPosAmt() : FIX::Group(753,707,FIX::message_order(707,708,1055,0)) {}
  301. FIELD_SET(*this, FIX::PosAmtType);
  302. FIELD_SET(*this, FIX::PosAmt);
  303. FIELD_SET(*this, FIX::PositionCurrency);
  304. };
  305. FIELD_SET(*this, FIX::RegistStatus);
  306. FIELD_SET(*this, FIX::DeliveryDate);
  307. FIELD_SET(*this, FIX::Text);
  308. FIELD_SET(*this, FIX::EncodedTextLen);
  309. FIELD_SET(*this, FIX::EncodedText);
  310. };
  311. }
  312. #endif