OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  12.0.0
API documentation
InstrumentSnapshot.h
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable OnixS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #pragma once
21 
27 
28 namespace OnixS
29 {
30  namespace Eurex
31  {
32  namespace MarketData
33  {
34 
35  /// Alternate identifier entry.
36  class ONIXS_EUREX_EMDI_API SecurityAlt : GroupInstance
37  {
38  public:
39 
40  /// Alternate instrument identifier.
42  {
43  StringRef val;
44  return get (Tags::SecurityAltID).toStringRef (val) ? val : StringRef();
45  }
46 
47  /// Security alternate id source.
49  {
50  StringRef val;
51  return get (Tags::SecurityAltIDSource).toStringRef (val) ? val : StringRef();
52  }
53 
54  private:
55  friend class TypedGroup<SecurityAlt>;
56 
57  SecurityAlt (const GroupInstance& groupInstance)
58  : GroupInstance (groupInstance)
59  {
60  }
61  };
62 
63  class SecurityAlts : public TypedGroup<SecurityAlt>
64  {
65  private:
66  explicit
67  SecurityAlts (const Group& group)
68  : TypedGroup<SecurityAlt> (group)
69  {
70  }
71 
72  friend class InstrumentSnapshot;
73  };
74 
75  /// Exposes list of available security types.
76  struct ONIXS_EUREX_EMDI_API SecurityType
77  {
78  enum Enum
79  {
80  /// Used to identify absence of value.
81  Undefined = -1,
82 
83  ///
84  Option = 0,
85 
86  ///
87  Future = 1,
88 
89  ///
90  MultiLegInstrument = 2,
91 
92  ///
93  VarianceFutures = 3,
94 
95  ///
96  TotalReturnFutures = 4,
97 
98  ///
99  CommonStock = 5,
100 
101  ///
102  Bond = 6,
103 
104  ///
105  TradeAtReferencePrice = 7,
106 
107  ///
108  ExchangeTradedFund = 8,
109 
110  ///
111  ExchangeTradedCommodity = 9,
112 
113  ///
114  ExchangeTradedNote = 10,
115 
116  ///
118 
119  ///
121 
122  ///
124 
125  ///
127 
128  ///
129  DigitalAssets
130  };
131  };
132 
133  /// Exposes list of Instrument scope operators.
134  struct ONIXS_EUREX_EMDI_API InstrumentScopeOperator
135  {
136  enum Enum
137  {
138  /// Used to identify absence of value.
139  Undefined = -1,
140 
141  ///
142  Include = 0,
143  };
144  };
145 
146 
147  ///
148  struct ONIXS_EUREX_EMDI_API PutOrCall
149  {
150  enum Enum
151  {
152  /// Used to identify absence of value.
153  Undefined = -1,
154 
155  ///
156  Put = 0,
157 
158  ///
159  Call = 1
160  };
161  };
162 
163 
164  ///
165  struct ONIXS_EUREX_EMDI_API ExerciseStyle
166  {
167  enum Enum
168  {
169  /// Used to identify absence of value.
170  Undefined = -1,
171 
172  ///
173  European = 0,
174 
175  ///
176  American = 1
177  };
178  };
179 
180  struct ONIXS_EUREX_EMDI_API MultilegModel
181  {
182  enum Enum
183  {
184  /// Used to identify absence of value.
185  Undefined = -1,
186 
187  ///
188  PredefinedMultilegSecurity = 0,
189 
190  ///
191  UserDefinedMultilegSecurity = 1
192  };
193  };
194 
195  ///
196  struct ONIXS_EUREX_EMDI_API ValuationMethod
197  {
198  enum Enum
199  {
200  /// Used to identify absence of value.
201  Undefined = -1,
202 
203  ///
204  PremiumStyle = 0,
205 
206  ///
207  FuturesStyleMarkToMarket = 1
208  };
209  };
210 
211  ///
212  struct ONIXS_EUREX_EMDI_API WarrantType
213  {
214  enum Enum
215  {
216  /// Used to identify absence of value.
217  Undefined = -1,
218 
219  ///
220  Call = 0,
221  ///
223  ///
225  ///
227  ///
228  Other
229  };
230  };
231 
232 
233  struct ONIXS_EUREX_EMDI_API SettlMethod
234  {
235  enum Enum
236  {
237  /// Used to identify absence of value.
238  Undefined = -1,
239 
240  ///
241  Cash = 0,
242 
243  ///
244  Physical = 1
245  };
246  };
247 
248  struct ONIXS_EUREX_EMDI_API SettlSubMethod
249  {
250  enum Enum
251  {
252  /// Used to identify absence of value.
253  Undefined = -1,
254 
255  ///
256  Shares = 0,
257  Derivatives = 1,
258  PaymentVsPayment = 2,
259  Notional = 3,
260  Cascade = 4,
261  Other = 5,
262  Energy = 6
263  };
264  };
265 
266  struct ONIXS_EUREX_EMDI_API InstrumentPartyIDSource
267  {
268  enum Enum
269  {
270  /// Used to identify absence of value.
271  Undefined = -1,
272 
273  ///
274  Proprietary = 0,
275  };
276  };
277 
278  struct ONIXS_EUREX_EMDI_API InstrumentPartyRole
279  {
280  enum Enum
281  {
282  /// Used to identify absence of value.
283  Undefined = -1,
284 
285  ///
286  ClearingOrganization = 0,
287  ///
288  MarketMaker = 1,
289  };
290  };
291 
292  struct ONIXS_EUREX_EMDI_API InstrumentPartyRoleQualifier
293  {
294  enum Enum
295  {
296  /// Used to identify absence of value.
297  Undefined = -1,
298 
299  ///
300  DesignatedSponsor = 0,
301 
302  ///
303  Specialist
304  };
305  };
306 
307  /// Deposit Type
308  struct ONIXS_EUREX_EMDI_API DepositType
309  {
310  enum Enum
311  {
312  /// Used to identify absence of value.
313  Undefined = -1,
314 
315  ///
316  Auslandskassenverein = 0,
317 
318  ///
319  Girosammelverwahrung = 1,
320 
321  ///
322  Streifbandverwahrung = 2,
323 
324  ///
325  Wertpapierrechnung = 3,
326 
327  ///
328  NcsCviaT2S = 4
329  };
330  };
331 
332  /// Accrued interest Calculation Methods
333  struct ONIXS_EUREX_EMDI_API AccruedInterestCalculationMethod
334  {
335  enum Enum
336  {
337  /// Used to identify absence of value.
338  Undefined = -1,
339 
340  ///
341  Basis30360 = 0,
342 
343  ///
345 
346  ///
348 
349  ///
351 
352  ///
354 
355  ///
357 
358  ///
360 
361  ///
363  };
364  };
365 
366  /// Coupon Types
367  struct ONIXS_EUREX_EMDI_API CouponType
368  {
369  enum Enum
370  {
371  /// Used to identify absence of value.
372  Undefined = -1,
373 
374  ///
375  Zero = 0,
376 
377  ///
379 
380  ///
382 
383  ///
385  };
386  };
387 
388  /// Cover Indicator
389  struct ONIXS_EUREX_EMDI_API CoverIndicator
390  {
391  enum Enum
392  {
393  /// Used to identify absence of value.
394  Undefined = -1,
395 
396  ///
397  Intraday = 0,
398 
399  ///
401 
402  ///
404  };
405  };
406 
407  /// Flat Indicators
408  struct ONIXS_EUREX_EMDI_API FlatIndicator
409  {
410  enum Enum
411  {
412  /// Used to identify absence of value.
413  Undefined = -1,
414 
415  ///
416  NoFlat = 0,
417 
418  ///
420 
421  ///
423  };
424  };
425 
426  /// Instrument Party.
427  class ONIXS_EUREX_EMDI_API InstrumentParty : GroupInstance
428  {
429  public:
430 
431  /// Identifies a party associated with an instrument.
432  StringRef id() const
433  {
434  StringRef val;
435  return get (Tags::InstrumentPartyID).toStringRef (val) ? val : StringRef();
436  }
437 
438  ///
440  {
441  return getIntEnumFieldValue<InstrumentPartyIDSource> (*this, Tags::InstrumentPartyIDSource);
442  }
443 
444  ///
446  {
447  return getIntEnumFieldValue<InstrumentPartyRole> (*this, Tags::InstrumentPartyRole);
448  }
449 
450  ///
452  {
453  return getIntEnumFieldValue<InstrumentPartyRoleQualifier> (*this, Tags::InstrumentPartyRoleQualifier);
454  }
455 
456  private:
458 
459  InstrumentParty (const GroupInstance& groupInstance)
460  : GroupInstance (groupInstance)
461  {
462  }
463  };
464 
465  struct ONIXS_EUREX_EMDI_API InstrumentAttributeType
466  {
467  enum Enum
468  {
469  /// Used to identify absence of value.
470  Undefined = -1,
471 
472  ///
473  MinimumReserveOrderQuantity = 0,
474  ///
475  MinimumDisplayQuantity = 1,
476  ///
477  IssuerName = 2,
478  ///
479  IssuerNumber = 3,
480  ///
481  MarketType = 4,
482  ///
483  MarketTypeSupplement = 5,
484  ///
485  ReportingMarket = 6,
486  ///
487  CumExIndicator = 7,
488  ///
489  ProductAssignmentGroup = 8,
490  ///
491  ProductAssignmentGroupDescription = 9,
492  ///
493  PreTradeLISValue = 10,
494  ///
495  VDOMinimumExecutionVolume = 11,
496  ///
497  IlliquidAsDefinedByExchange = 12,
498  ///
499  MarketMakingObligation = 13,
500  ///
501  LiquidAsDefinedByRegulator = 14,
502  ///
503  EligibleForStressedMarketConditions = 15,
504  ///
506  ///
508  ///
510  ///
512  ///
514  ///
516  ///
518  ///
520  ///
522  ///
524  ///
526  ///
528  ///
529  LiquidityClass
530  };
531  };
532 
533  struct ONIXS_EUREX_EMDI_API InstrumentAuctionType
534  {
535  enum Enum
536  {
537  /// Used to identify absence of value.
538  Undefined = -1,
539 
540  ///
541  Default = 0,
542  ///
543  SingleAuction = 1,
544  ///
545  SpecialAuction = 2
546  };
547  };
548 
549  struct ONIXS_EUREX_EMDI_API PostTradeAnonymityType
550  {
551  enum Enum
552  {
553  /// Used to identify absence of value.
554  Undefined = -1,
555 
556  ///
557  Disabled = 0,
558  ///
559  Enabled = 1,
560  ///
561  CentralCounterparty = 2,
562  };
563  };
564 
565  struct ONIXS_EUREX_EMDI_API PriceType
566  {
567  enum Enum
568  {
569  /// Used to identify absence of value.
570  Undefined = -1,
571 
572  ///
573  Percent = 0,
574  ///
575  Shares = 1,
576  ///
577  Points = 2,
578  };
579  };
580 
581  struct ONIXS_EUREX_EMDI_API ContractIdentificationEligibility
582  {
583  enum Enum
584  {
585  /// Used to identify absence of value.
586  Undefined = -1,
587 
588  ///
590 
591  ///
593 
594  ///
596  };
597  };
598 
599 
600  struct ONIXS_EUREX_EMDI_API ContractCycleType
601  {
602  enum Enum
603  {
604  /// Used to identify absence of value.
605  Undefined = -1,
606 
607  ///
608  Dayly = 0,
609 
610  ///
612 
613  ///
615 
616  ///
618 
619  ///
621 
622  ///
624  };
625  };
626 
627  struct ONIXS_EUREX_EMDI_API ContractCycleSubType
628  {
629  enum Enum
630  {
631  /// Used to identify absence of value.
632  Undefined = -1,
633 
634  ///
635  EndOfMonth = 0,
636  };
637  };
638 
639  struct ONIXS_EUREX_EMDI_API ContractFrequency
640  {
641  enum Enum
642  {
643  /// Used to identify absence of value.
644  Undefined = -1,
645 
646  ///
647  Day = 0,
648 
649  ///
651 
652  ///
654 
655  ///
657 
658  ///
659  EndOfMonth
660 
661  };
662  };
663 
664  struct ONIXS_EUREX_EMDI_API ContractDisplayInstruction
665  {
666  enum Enum
667  {
668  /// Used to identify absence of value.
669  Undefined = -1,
670 
671  ///
672  None = 0,
673 
674  ///
676 
677  ///
679 
680  ///
682 
683  ///
685 
686  ///
688 
689  ///
691 
692  ///
694 
695  ///
697 
698  ///
700 
701  ///
703 
704  ///
705  EndOfMonth
706  };
707  };
708 
709  struct ONIXS_EUREX_EMDI_API DisplaySeason
710  {
711  enum Enum
712  {
713  /// Used to identify absence of value.
714  Undefined = -1,
715 
716  ///
717  Summer = 0,
718 
719  ///
721  };
722  };
723 
724  class InstrumentParties : public TypedGroup<InstrumentParty>
725  {
726  private:
727  explicit
728  InstrumentParties (const Group& group)
730  {
731  }
732 
733  friend class InstrumentSnapshot;
734  };
735 
736  /// Instrument Attribute.
737  class ONIXS_EUREX_EMDI_API InstrumentAttribute : GroupInstance
738  {
739  public:
740 
741  ///
743  {
744  return getIntEnumFieldValue<InstrumentAttributeType> (*this, Tags::InstrAttribType);
745  }
746 
747  ///
748  StringRef value() const
749  {
750  StringRef val;
751  return get (Tags::InstrAttribValue).toStringRef (val) ? val : StringRef();
752  }
753 
754  private:
756 
757  InstrumentAttribute (const GroupInstance& groupInstance)
758  : GroupInstance (groupInstance)
759  {
760  }
761  };
762 
763  class InstrumentAttributes : public TypedGroup<InstrumentAttribute>
764  {
765  private:
766  explicit
767  InstrumentAttributes (const Group& group)
769  {
770  }
771 
772  friend class InstrumentSnapshot;
773  };
774 
775 
776  /// Event.
777  class ONIXS_EUREX_EMDI_API Event : GroupInstance
778  {
779  public:
780  /// Event Type
781  bool eventType (UInt32& type) const
782  {
783  return get (Tags::EventType).toNumber (type);
784  }
785 
786  /// Event Date
788  {
789  return getUInt32 (Tags::EventDate);
790  }
791 
792  private:
793  friend class TypedGroup<Event>;
794 
795  Event (const GroupInstance& groupInstance)
796  : GroupInstance (groupInstance)
797  {
798  }
799  };
800 
801  class Events : public TypedGroup<Event>
802  {
803  private:
804  explicit
805  Events (const Group& group)
806  : TypedGroup<Event> (group)
807  {
808  }
809 
810  friend class InstrumentSnapshot;
811  };
812 
813  ///
814  class InstrumentSnapshotLegs : public TypedGroup<InstrumentLeg>
815  {
816  private:
817  explicit
818  InstrumentSnapshotLegs (const Group& group)
819  : TypedGroup<InstrumentLeg> (group)
820  {
821  }
822 
823  friend class InstrumentSnapshot;
824  };
825 
826 
827  /// TradingSessionRules
828  class ONIXS_EUREX_EMDI_API TradingSessionRule : GroupInstance
829  {
830  public:
831 
832  /// Trading Session ID
834  {
835  return 0u;
836  }
837 
838  /// Defines the trading session sub ID.
840  {
841  return getIntEnumFieldValue<TradingSessionSubID> (*this, Tags::TradingSessionSubID);
842  }
843 
844  private:
846 
847  TradingSessionRule (const GroupInstance& groupInstance)
848  : GroupInstance (groupInstance)
849  {
850  }
851  };
852 
853  ///
854  class TradingSessionRules : public TypedGroup<TradingSessionRule>
855  {
856  private:
857  explicit
858  TradingSessionRules (const Group& group)
860  {
861  }
862 
863  friend class InstrumentSnapshot;
864  };
865 
866  /// Instrument snapshot.
867  class ONIXS_EUREX_EMDI_API InstrumentSnapshot : public Message
868  {
869  public:
870  /// Instrument identifier.
872  {
873  return getInt64 (Tags::SecurityID);
874  }
875 
876  /// Entries.
878  {
879  return SecurityAlts ( getGroup (Tags::NoSecurityAltID) );
880  }
881 
882  /// Type of security.
884  {
885  return getIntEnumFieldValue<SecurityType> (*this, Tags::SecurityType);
886  }
887 
888  /// Security Status.
890  {
891  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::SecurityStatus);
892  }
893 
894  /// Security description
895  bool securityDesc(StringRef& desc) const
896  {
897  return get (Tags::SecurityDesc).toStringRef (desc);
898  }
899 
900  /// MIC (ISO 10383), used to identify an instrument of a co-operation partner.
901  bool securityExchange (StringRef& exchange) const
902  {
903  return get (Tags::SecurityExchange).toStringRef (exchange);
904  }
905 
906  /// Type of Market Data update action
908  {
909  return getNonZeroIntEnumFieldValue<InstrumentType>(*this, Tags::ProductComplex);
910  }
911 
912  /// Indicates the type of security using ISO 10962 standard.
913  bool cfiCode(StringRef desc) const
914  {
915  return get (Tags::CFICode).toStringRef (desc);
916  }
917 
918  /// Defines the granularity which suffice to identify a standard e.g. non - flexible contract uniquely within a product.
920  {
921  return getIntEnumFieldValue<ContractIdentificationEligibility>(*this, Tags::ContractIdentificationEligibility);
922  }
923 
924  /// Defines, if this contract based on its contract generation cycle, is considered primary.
925  bool isPrimary() const
926  {
927  UInt32 value;
928  return get(Tags::IsPrimary).toNumber(value) ? (value == 1) : false;
929  }
930 
931  /// Actual contract start date
932  bool contractDate (UInt32& value)
933  {
934  return get (Tags::ContractDate).toNumber (value);
935  }
936 
937  /// Contract start month
938  bool contractMonthYear (UInt32& value)
939  {
940  return get (Tags::ContractMonthYear).toNumber (value);
941  }
942 
943  /// Defines the instrument cycle type
945  {
946  return getIntEnumFieldValue<ContractCycleType>(*this, Tags::ContractCycleType);
947  }
948 
949  /// Indicates the kind of regular expiration pattern, in the context of ContractCycleType(30865).
951  {
952  return getIntEnumFieldValue<ContractCycleSubType>(*this, Tags::ContractCycleSubType);
953  }
954 
955  /// Indicates the kind of regular expiration pattern, in the context of ContractCycleType(30865).
957  {
958  return getIntEnumFieldValue<ContractFrequency>(*this, Tags::ContractFrequency);
959  }
960 
961  /// Defines the instrument display instruction
963  {
964  return getIntEnumFieldValue<ContractDisplayInstruction>(*this, Tags::ContractDisplayInstruction);
965  }
966 
967  /// Display Day
968  bool displayDay(UInt32& value)
969  {
970  return get(Tags::DisplayDay).toNumber(value);
971  }
972 
973  /// Display Relative Day
975  {
976  return get(Tags::DisplayRelativeDay).toNumber(value);
977  }
978 
979  /// Display Week
980  bool displayWeek(UInt32& value)
981  {
982  return get(Tags::DisplayWeek).toNumber(value);
983  }
984 
985  /// Display Month
986  bool displayMonth(UInt32& value)
987  {
988  return get(Tags::DisplayMonth).toNumber(value);
989  }
990 
991  /// The Display Quarter denotes the three-month period inside a year.
992  bool displayQuarter(UInt32& value)
993  {
994  return get(Tags::DisplayQuarter).toNumber(value);
995  }
996 
997  /// Defines the instrument display instruction
999  {
1000  return getIntEnumFieldValue<DisplaySeason>(*this, Tags::DisplaySeason);
1001  }
1002 
1003  /// Display Year
1004  bool displayYear(UInt32& value)
1005  {
1006  return get(Tags::DisplayYear).toNumber(value);
1007  }
1008 
1009  /// Display Name
1010  bool displayName(StringRef& val) const
1011  {
1012  return get(Tags::DisplayName).toStringRef(val);
1013  }
1014 
1015  /// Strike Price
1016  bool strikePrice (Decimal& price) const
1017  {
1018  return get (Tags::StrikePrice).toNumber (price);
1019  }
1020 
1021  /// Strike Price Precision
1022  bool strikePricePrecision (UInt32& precision) const
1023  {
1024  return get (Tags::StrikePricePrecision).toNumber (precision);
1025  }
1026 
1027  /// Contract Multiplier
1028  bool contractMultiplier (Decimal& multiplier) const
1029  {
1030  return get (Tags::ContractMultiplier).toNumber (multiplier);
1031  }
1032 
1033  /// Put Or Call
1035  {
1036  return getIntEnumFieldValue<PutOrCall> (*this, Tags::PutOrCall);
1037  }
1038 
1039  /// Version of an option. Version can change as a result of corporate actions or events.
1040  bool optAttribute (UInt32& attribute) const
1041  {
1042  return get (Tags::OptAttribute).toNumber (attribute);
1043  }
1044 
1045  /// Exercise Style
1047  {
1048  return getIntEnumFieldValue<ExerciseStyle> (*this, Tags::ExerciseStyle);
1049  }
1050 
1051  /// Original strike price prior to corporate action, e.g. 5.20.
1052  bool origStrikePrice (Decimal& price) const
1053  {
1054  return get (Tags::OrigStrikePrice).toNumber (price);
1055  }
1056 
1057  /// Contract generation.
1058  bool contractGenerationNumber (UInt32& number) const
1059  {
1060  return get (Tags::ContractGenerationNumber).toNumber (number);
1061  }
1062 
1063  /// Lepo Flag
1065  {
1066  UInt32 value;
1067  return (get (Tags::LowExercisePriceOptionIndicator).toNumber (value) ) ? (value == 1) : false;
1068  }
1069 
1070  /// Traditional or futures margin style.
1072  {
1073  return getIntEnumFieldValue<ValuationMethod> (*this, Tags::ValuationMethod);
1074  }
1075 
1076  ///
1078  {
1079  return getIntEnumFieldValue<SettlMethod> (*this, Tags::SettlMethod);
1080  }
1081 
1082  ///
1084  {
1085  return getIntEnumFieldValue<SettlSubMethod> (*this, Tags::SettlSubMethod);
1086  }
1087 
1088  /// Previous day's settlement price. Converted in trading notation in case of variance futures.
1089  bool priorSettlPrice (Decimal& price) const
1090  {
1091  return get (Tags::PriorSettlPrice).toNumber (price);
1092  }
1093 
1094  /// Common integer multiple of the option legs for Option Volatility Strategies.
1095  bool legRatioMultiplier(UInt32& value) const
1096  {
1097  return get(Tags::LegRatioMultiplier).toNumber(value);
1098  }
1099 
1100  /// Legs
1102  {
1103  return InstrumentSnapshotLegs ( getGroup (Tags::NoLegs) );
1104  }
1105 
1106  /// Refers to MarketSegmentID (1300) from the underlying Product Snapshot.
1108  {
1109  return get(Tags::UnderlyingMarketSegmentID).toNumber(val);
1110  }
1111 
1112  /// Refers to SecurityID (48) from the underlying Instrument Snapshot.
1113  bool underlyingSecurityID(Int64& val) const
1114  {
1115  return get(Tags::UnderlyingSecurityID).toNumber(val);
1116  }
1117 
1118 
1119  /// UnitOfMeasure
1120  bool unitOfMeasure(StringRef& val) const
1121  {
1122  return get(Tags::UnitOfMeasure).toStringRef(val);
1123  }
1124 
1125  /// AssetType
1126  bool assetType(UInt32& val) const
1127  {
1128  return get(Tags::AssetType).toNumber(val);
1129  }
1130 
1131  /// AssetSubType
1132  bool assetSubType(UInt32& val) const
1133  {
1134  return get(Tags::AssetSubType).toNumber(val);
1135  }
1136 
1137  /// Transact Time
1138  bool transactTime (UInt64& time) const
1139  {
1140  return get (Tags::TransactTime).toNumber (time);
1141  }
1142 
1143  /// Reference to tick size table identifier from product level message.
1144  bool refTickTableID (UInt32& time) const
1145  {
1146  return get (Tags::RefTickTableID).toNumber (time);
1147  }
1148 
1149  /// Currency as published in ISO 4217.
1151  {
1152  return getStringRef (Tags::Currency);
1153  }
1154 
1155  /// Settlement currency.
1156  bool settlCurrency(StringRef& desc) const
1157  {
1158  return get (Tags::SettlCurrency).toStringRef (desc);
1159  }
1160 
1161  /// DepositType
1163  {
1164  return getIntEnumFieldValue<DepositType>(*this, Tags::DepositType);
1165  }
1166 
1167  /// Issuer of instrument.
1169  {
1170  return getStringRef(Tags::Issuer);
1171  }
1172 
1173  /// Issue date of instrument.
1174  bool issueDate(UInt32& date) const
1175  {
1176  return get(Tags::IssueDate).toNumber(date);
1177  }
1178 
1179  ///
1180  bool roundLot(Decimal& value) const
1181  {
1182  return get(Tags::RoundLot).toNumber(value);
1183  }
1184 
1185  /// The minimum tradable unit of a bond.
1186  bool minTradeVol(Decimal& value) const
1187  {
1188  return get(Tags::MinTradeVol).toNumber(value);
1189  }
1190 
1191  /// QuotingStartTime
1192  bool quotingStartTime(StringRef value) const
1193  {
1194  return get(Tags::QuotingStartTime).toStringRef(value);
1195  }
1196 
1197  /// QuotingEndTime
1198  bool quotingEndTime(StringRef value) const
1199  {
1200  return get(Tags::QuotingEndTime).toStringRef(value);
1201  }
1202 
1203  /// InstrumentAuctionType
1205  {
1206  return getIntEnumFieldValue<InstrumentAuctionType>(*this, Tags::InstrumentAuctionType);
1207  }
1208 
1209  /// Instrument parties.
1211  {
1212  return InstrumentParties ( getOptionalGroup (Tags::NoInstrumentParties) );
1213  }
1214 
1215  /// Underlying symbol.
1217  {
1218  return getStringRef(Tags::UnderlyingSymbol);
1219  }
1220 
1221  /// Instrument identifier of the leg security.
1222  bool couponRate(Decimal& value) const
1223  {
1224  return get(Tags::CouponRate).toNumber(value);
1225  }
1226 
1227  /// Previous coupon payment date.
1229  {
1230  return get(Tags::PreviousCouponPaymentDate).toNumber(value);
1231  }
1232 
1233  /// Upcoming Coupon payment date.
1234  bool couponPaymentDate(UInt32& value) const
1235  {
1236  return get(Tags::CouponPaymentDate).toNumber(value);
1237  }
1238 
1239  /// Defines the Accrued interest Calculation Method.
1241  {
1242  return getIntEnumFieldValue<AccruedInterestCalculationMethod>(*this, Tags::CouponDayCount);
1243  }
1244 
1245  /// Coupon Type
1247  {
1248  return getIntEnumFieldValue<CouponType>(*this, Tags::CouponType);
1249  }
1250 
1251  /// The accrued interest is rounded to the 12th decimal except for Country(421) = HU, rounded to the 7th decimal.
1253  {
1254  return getStringRef(Tags::CountryOfIssue);
1255  }
1256 
1257  /// The Flat Indicator of a bond.
1259  {
1260  return getIntEnumFieldValue<FlatIndicator>(*this, Tags::FlatIndicator);
1261  }
1262 
1263  /// WarrantType
1265  {
1266  return getIntEnumFieldValue<WarrantType>(*this, Tags::WarrantType);
1267  }
1268 
1269  /// CoverIndicator
1271  {
1272  return getIntEnumFieldValue<CoverIndicator>(*this, Tags::CoverIndicator);
1273  }
1274 
1275  /// Reference to Volatility Corridor Table for Opening Auction
1277  {
1278  return get(Tags::VolatilityCorridorOpeningAuction).toNumber(value);
1279  }
1280 
1281  /// Reference to Volatility Corridor Table for Intraday Auction
1283  {
1284  return get(Tags::VolatilityCorridorIntradayAuction).toNumber(value);
1285  }
1286 
1287  /// Reference to Volatility Corridor Table for Closing Auction
1289  {
1290  return get(Tags::VolatilityCorridorClosingAuction).toNumber(value);
1291  }
1292 
1293  /// Reference to Volatility Corridor Table in Continuous
1295  {
1296  return get(Tags::VolatilityCorridorContinuous).toNumber(value);
1297  }
1298 
1299  /// Instrument attributes
1301  {
1302  return InstrumentAttributes ( getOptionalGroup (Tags::NoInstrAttrib) );
1303  }
1304 
1305  /// Events.
1306  Events events() const
1307  {
1308  return Events ( getGroup (Tags::NoEvents) );
1309  }
1310 
1311  /// Instrument Price Precision
1312  bool instrumentPricePrecision (UInt32& value) const
1313  {
1314  return get (Tags::InstrumentPricePrecision).toNumber (value);
1315  }
1316 
1317  /// Defines the minimum price movement in ticks (tick size).
1318  bool minPriceIncrement (Decimal& increment) const
1319  {
1320  return get (Tags::MinPriceIncrement).toNumber (increment);
1321  }
1322 
1323  /// Defines the minimum increment for trade prices in clearing notation (clearing tick size).
1325  {
1326  return get (Tags::MinPriceIncrementClearing).toNumber (price);
1327  }
1328 
1329  /// Defines the minimum price movement in the respective currency (tick value).
1331  {
1332  return getDecimal (Tags::MinPriceIncrementAmount);
1333  }
1334 
1335  /// Actual expiration day of the instrument (YYYYMMDD).
1336  bool maturityDate(Timestamp& date) const
1337  {
1338  UInt32 tmp;
1339  if (get(Tags::MaturityDate).toNumber(tmp))
1340  {
1342  return true;
1343  }
1344  return false;
1345  }
1346 
1347  /// Expiration month (YYYYMM).
1348  bool maturityMonthYear(UInt32& monthYear) const
1349  {
1350  return get(Tags::MaturityMonthYear).toNumber(monthYear);
1351  }
1352 
1353  /// Standard strategy type for complex instruments.
1354  bool securitySubType(UInt32& type) const
1355  {
1356  return get(Tags::SecuritySubType).toNumber(type);
1357  }
1358 
1359  /// Product identifier.
1361  {
1362  return getGroup (Tags::NoMarketSegments).at (0).getUInt32 (Tags::MarketSegmentID);
1363  }
1364 
1365  /// Implied market indicator
1367  {
1368  return getIntEnumFieldValue<ImpliedMarketIndicator> (getGroup (Tags::NoMarketSegments).at (0), Tags::ImpliedMarketIndicator);
1369  }
1370 
1371  /// Multileg model
1373  {
1374  return getIntEnumFieldValue<MultilegModel> (getGroup (Tags::NoMarketSegments).at (0), Tags::MultilegModel);
1375  }
1376 
1377  /// The unit in which an instrument is quoted/stated when buying or selling. Only for cash.
1379  {
1380  return getIntEnumFieldValue<PriceType> (getGroup (Tags::NoMarketSegments).at (0), Tags::PriceType);
1381  }
1382 
1383  /// Only for cash.
1385  {
1386  return getIntEnumFieldValue<PostTradeAnonymityType> (getGroup (Tags::NoMarketSegments).at (0), Tags::PostTradeAnonymity);
1387  }
1388 
1389  /// Settlment Business Days
1390  bool settlBusinessDays (UInt32& value) const
1391  {
1392  return get (Tags::SettlBusinessDays).toNumber (value);
1393  }
1394 
1395  /// Bid side minimum quote quantity.
1397  {
1398  return getGroup (Tags::NoMarketSegments).at(0).getGroup(Tags::NoQuoteSizeRules).at(0).get(Tags::MinBidSize).toNumber(value);
1399  }
1400 
1401  /// Bid side minimum quote quantity.
1402  bool quoteSizeMinOfferSize(Decimal& value) const
1403  {
1404  return getGroup (Tags::NoMarketSegments).at(0).getGroup(Tags::NoQuoteSizeRules).at(0).get(Tags::MinOfferSize).toNumber(value);
1405  }
1406 
1407  /// Bid side minimum quote quantity.
1409  {
1410  return getGroup (Tags::NoMarketSegments).at(0).getGroup(Tags::NoPriceRangeRules).at(0).getUInt32(Tags::PriceRangeRuleID);
1411  }
1412 
1413  ///
1414  bool symbol(StringRef value) const
1415  {
1416  return get(Tags::Symbol).toStringRef(value);
1417  }
1418 
1419  ///
1421  {
1422  return TradingSessionRules(getOptionalGroup(Tags::NoTradingSessionRules));
1423  }
1424 
1425  private:
1426  friend class InstrumentSnapshotWrapper;
1428 
1429  InstrumentSnapshot (const void* impl)
1430  : Message (impl)
1431  {
1432  }
1433  };
1434  }
1435  }
1436 }
InstrumentAttributes instrumentAttributes() const
Instrument attributes.
bool minTradeVol(Decimal &value) const
The minimum tradable unit of a bond.
const Tag NoInstrumentParties
Definition: Tags.h:210
bool minPriceIncrementClearing(Decimal &price) const
Defines the minimum increment for trade prices in clearing notation (clearing tick size)...
MarketSegmentId marketSegmentId() const
Product identifier.
const Tag MinPriceIncrement
Definition: Tags.h:89
PostTradeAnonymityType::Enum postTradeAnonymity() const
Only for cash.
bool legRatioMultiplier(UInt32 &value) const
Common integer multiple of the option legs for Option Volatility Strategies.
bool displayName(StringRef &val) const
Display Name.
const Tag UnderlyingSecurityID
Definition: Tags.h:157
AccruedInterestCalculationMethod::Enum couponDayCount() const
Defines the Accrued interest Calculation Method.
bool instrumentPricePrecision(UInt32 &value) const
Instrument Price Precision.
const Tag NoTradingSessionRules
Definition: Tags.h:232
bool minPriceIncrement(Decimal &increment) const
Defines the minimum price movement in ticks (tick size).
const Tag LowExercisePriceOptionIndicator
Definition: Tags.h:150
bool quotingStartTime(StringRef value) const
QuotingStartTime.
bool contractMonthYear(UInt32 &value)
Contract start month.
InstrumentType::Enum productComplex() const
Type of Market Data update action.
ContractFrequency::Enum contractFrequency() const
Indicates the kind of regular expiration pattern, in the context of ContractCycleType(30865).
bool contractMultiplier(Decimal &multiplier) const
Contract Multiplier.
InstrumentPartyRole::Enum role() const
const Tag ContractDisplayInstruction
Definition: Tags.h:284
bool quoteSizeRuleMinBidSize(Decimal &value) const
Bid side minimum quote quantity.
const Tag VolatilityCorridorIntradayAuction
Definition: Tags.h:308
ValuationMethod::Enum valuationMethod() const
Traditional or futures margin style.
bool volatilityCorridorContinuous(UInt32 &value) const
Reference to Volatility Corridor Table in Continuous.
StringRef id() const
Identifies a party associated with an instrument.
bool cfiCode(StringRef desc) const
Indicates the type of security using ISO 10962 standard.
MultilegModel::Enum multilegModel() const
Multileg model.
bool couponPaymentDate(UInt32 &value) const
Upcoming Coupon payment date.
InstrumentPartyIDSource::Enum idSource() const
const Tag VolatilityCorridorOpeningAuction
Definition: Tags.h:307
bool previousCouponPaymentDate(UInt32 &value) const
Previous coupon payment date.
const Tag TradingSessionSubID
Definition: Tags.h:77
ContractDisplayInstruction::Enum contractDisplayInstruction() const
Defines the instrument display instruction.
const Tag PostTradeAnonymity
Definition: Tags.h:222
bool couponRate(Decimal &value) const
Instrument identifier of the leg security.
DepositType::Enum depositType() const
DepositType.
const Tag InstrumentPartyRoleQualifier
Definition: Tags.h:216
bool settlCurrency(StringRef &desc) const
Settlement currency.
bool displayRelativeDay(UInt32 &value)
Display Relative Day.
const Tag InstrumentPartyRole
Definition: Tags.h:215
bool displayMonth(UInt32 &value)
Display Month.
StringRef issuer() const
Issuer of instrument.
bool transactTime(UInt64 &time) const
Transact Time.
bool securityDesc(StringRef &desc) const
Security description.
InstrumentAuctionType::Enum instrumentAuctionType() const
InstrumentAuctionType.
PriceType::Enum priceType() const
The unit in which an instrument is quoted/stated when buying or selling. Only for cash...
const Tag InstrumentPartyIDSource
Definition: Tags.h:214
const Tag VolatilityCorridorContinuous
Definition: Tags.h:310
SecurityId securityId() const
Instrument identifier.
bool eventType(UInt32 &type) const
Event Type.
bool optAttribute(UInt32 &attribute) const
Version of an option. Version can change as a result of corporate actions or events.
const Tag MinPriceIncrementAmount
Definition: Tags.h:97
DisplaySeason::Enum displaySeason() const
Defines the instrument display instruction.
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
const Tag LegRatioMultiplier
Definition: Tags.h:287
const Tag InstrumentPricePrecision
Definition: Tags.h:149
TradingSessionSubID::Enum tradingSessionSubID() const
Defines the trading session sub ID.
bool volatilityCorridorIntradayAuction(UInt32 &value) const
Reference to Volatility Corridor Table for Intraday Auction.
Indicates timestamp in "YYYYMMDD" format.
Definition: Timestamp.h:70
bool quotingEndTime(StringRef value) const
QuotingEndTime.
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
StringRef currency() const
Currency as published in ISO 4217.
const Tag ContractGenerationNumber
Definition: Tags.h:121
InstrumentSnapshotLegs legs() const
Legs.
bool securitySubType(UInt32 &type) const
Standard strategy type for complex instruments.
bool contractGenerationNumber(UInt32 &number) const
Contract generation.
UInt32 tradingSessionID() const
Trading Session ID.
const Tag UnderlyingMarketSegmentID
Definition: Tags.h:289
bool issueDate(UInt32 &date) const
Issue date of instrument.
const Tag StrikePricePrecision
Definition: Tags.h:148
ExerciseStyle::Enum exerciseStyle() const
Exercise Style.
bool quoteSizeMinOfferSize(Decimal &value) const
Bid side minimum quote quantity.
const Tag DisplayRelativeDay
Definition: Tags.h:299
ImpliedMarketIndicator::Enum impliedMarketIndicator() const
Implied market indicator.
bool securityExchange(StringRef &exchange) const
MIC (ISO 10383), used to identify an instrument of a co-operation partner.
bool underlyingMarketSegmentID(UInt32 &val) const
Refers to MarketSegmentID (1300) from the underlying Product Snapshot.
bool underlyingSecurityID(Int64 &val) const
Refers to SecurityID (48) from the underlying Instrument Snapshot.
bool contractDate(UInt32 &value)
Actual contract start date.
FlatIndicator::Enum flatIndicator() const
The Flat Indicator of a bond.
Represents timestamp without time-zone information.
Definition: Timestamp.h:87
bool maturityMonthYear(UInt32 &monthYear) const
Expiration month (YYYYMM).
CoverIndicator::Enum coverIndicator() const
CoverIndicator.
bool displayDay(UInt32 &value)
Display Day.
bool isPrimary() const
Defines, if this contract based on its contract generation cycle, is considered primary.
ContractCycleSubType::Enum contractCycleSubType() const
Indicates the kind of regular expiration pattern, in the context of ContractCycleType(30865).
ContractIdentificationEligibility::Enum contractIdentificationEligibility() const
Defines the granularity which suffice to identify a standard e.g. non - flexible contract uniquely wi...
SecurityType::Enum securityType() const
Type of security.
ContractCycleType::Enum contractCycleType() const
Defines the instrument cycle type.
bool strikePricePrecision(UInt32 &precision) const
Strike Price Precision.
const Tag SecurityAltIDSource
Definition: Tags.h:68
bool settlBusinessDays(UInt32 &value) const
Settlment Business Days.
bool lowExercisePriceOptionIndicator() const
Lepo Flag.
bool assetSubType(UInt32 &val) const
AssetSubType.
StringRef securityAltID() const
Alternate instrument identifier.
bool priorSettlPrice(Decimal &price) const
Previous day&#39;s settlement price. Converted in trading notation in case of variance futures...
CouponType::Enum couponType() const
Coupon Type.
WarrantType::Enum warrantType() const
WarrantType.
InstrumentParties instrumentParties() const
Instrument parties.
StringRef countryOfIssue() const
The accrued interest is rounded to the 12th decimal except for Country(421) = HU, rounded to the 7th ...
const Tag ContractMultiplier
Definition: Tags.h:51
Exposes list of Instrument scope operators.
SecurityStatus::Enum securityStatus() const
Security Status.
const Tag ContractCycleSubType
Definition: Tags.h:295
bool volatilityCorridorClosingAuction(UInt32 &value) const
Reference to Volatility Corridor Table for Closing Auction.
bool volatilityCorridorOpeningAuction(UInt32 &value) const
Reference to Volatility Corridor Table for Opening Auction.
PutOrCall::Enum putOrCall() const
Put Or Call.
InstrumentPartyRoleQualifier::Enum roleQualifier() const
InstrumentAttributeType::Enum type() const
const Tag ImpliedMarketIndicator
Definition: Tags.h:96
Decimal minPriceIncrementAmount() const
Defines the minimum price movement in the respective currency (tick value).
UInt32 eventDate() const
Event Date.
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
const Tag ContractIdentificationEligibility
Definition: Tags.h:293
bool origStrikePrice(Decimal &price) const
Original strike price prior to corporate action, e.g. 5.20.
Alternate identifier entry.
const Tag PreviousCouponPaymentDate
Definition: Tags.h:247
bool strikePrice(Decimal &price) const
Strike Price.
const Tag InstrumentAuctionType
Definition: Tags.h:267
StringRef underlyingSymbol() const
Underlying symbol.
const Tag MinPriceIncrementClearing
Definition: Tags.h:220
bool refTickTableID(UInt32 &time) const
Reference to tick size table identifier from product level message.
const Tag MaturityMonthYear
Definition: Tags.h:46
bool unitOfMeasure(StringRef &val) const
UnitOfMeasure.
StringRef securityAltIDSource() const
Security alternate id source.
const Tag VolatilityCorridorClosingAuction
Definition: Tags.h:309
SecurityAlts securityAlts() const
Entries.
bool displayWeek(UInt32 &value)
Display Week.
UInt32 priceRangeRuleID() const
Bid side minimum quote quantity.
static Timestamp parse(const std::string &, TimestampFormat::Enum=TimestampFormat::YYYYMMDDHHMMSSNsec)
bool assetType(UInt32 &val) const
AssetType.
bool displayQuarter(UInt32 &value)
The Display Quarter denotes the three-month period inside a year.
bool displayYear(UInt32 &value)
Display Year.
const Tag SecurityExchange
Definition: Tags.h:50
bool maturityDate(Timestamp &date) const
Actual expiration day of the instrument (YYYYMMDD).
Exposes list of available security types.