OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  16.1.0
API documentation
MassInstrumentStateChange.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  class ONIXS_EUREX_EMDI_API SecMassStat : GroupInstance
36  {
37  public:
38 
39  /// Instrument identifier.
41  {
42  return getInt64 (Tags::SecurityID);
43  }
44 
45  /// Security Status.
47  {
48  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::SecurityStatus);
49  }
50 
51  /// Defines the security trading status.
53  {
54  return getIntEnumFieldValue<SecurityTradingStatus> (*this, Tags::SecurityTradingStatus);
55  }
56 
57  /// Indicator for stressed market conditions.
59  {
60  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MarketCondition);
61  }
62 
63  /// Identifies an event related to a securityTradingStatus()
65  {
66  return getIntEnumFieldValue<SecurityTradingEvent> (*this, Tags::SecurityTradingEvent);
67  }
68 
69  /// Identifies the sold out status (applicable for continuous auction trading model only).
71  {
72  return getNonZeroIntEnumFieldValue<SoldOutIndicator>(*this, Tags::SoldOutIndicator);
73  }
74 
75  /// Upper boundary price.
76  bool highPx(Decimal& price) const
77  {
78  return get(Tags::HighPx).toNumber(price);
79  }
80 
81  /// Lower boundary price.
82  bool lowPx(Decimal& price) const
83  {
84  return get(Tags::LowPx).toNumber(price);
85  }
86 
87  /// Defines the TES trading session status.
89  {
90  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::TESSecurityStatus);
91  }
92 
93  private:
94  friend class TypedGroup<SecMassStat>;
95 
96  SecMassStat (const GroupInstance& groupInstance)
97  : GroupInstance (groupInstance)
98  {
99  }
100  };
101 
102  class SecMassStats : public TypedGroup<SecMassStat>
103  {
104  private:
105  explicit
106  SecMassStats (const Group& group)
107  : TypedGroup<SecMassStat> (group)
108  {
109  }
110 
112  };
113 
114  /// Mass instrument state change
115  class ONIXS_EUREX_EMDI_API MassInstrumentStateChange : public Message
116  {
117  public:
118  /// Product identifier.
120  {
121  return getUInt32 (Tags::MarketSegmentID);
122  }
123 
124  /// Instrument type of affected instruments.
126  {
127  return getNonZeroIntEnumFieldValue<InstrumentType> (*this, Tags::InstrumentScopeProductComplex);
128  }
129 
130  /// SecurityMassStatus
132  {
133  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::SecurityMassStatus);
134  }
135 
136  /// Defines the security mass trading status.
138  {
139  return getIntEnumFieldValue<SecurityTradingStatus> (*this, Tags::SecurityMassTradingStatus);
140  }
141 
142  /// Identifies an event related to a securityMassTradingStatus().
144  {
145  return getIntEnumFieldValue<SecurityTradingEvent> (*this, Tags::SecurityMassTradingEvent);
146  }
147 
148  /// MassSoldOutIndicator
150  {
151  return getNonZeroIntEnumFieldValue<SoldOutIndicator> (*this, Tags::MassSoldOutIndicator);
152  }
153 
154  /// Indicates if product is in the state Fast Market.
155  bool fastMarketIndicator() const
156  {
157  return getUInt32 (Tags::FastMarketIndicator) == 1;
158  }
159 
160  /// Time when request was processed by the matcher (nanoseconds).
161  UInt64 transactTime() const
162  {
163  return getUInt64 (Tags::TransactTime);
164  }
165 
166  /// TESSecurityMassStatus
168  {
169  return getIntEnumFieldValue<SecurityStatus> (*this, Tags::TESSecurityMassStatus);
170  }
171 
172  /// checks existence of optional group
173  /// deprecated - please use Group::size() instead
174  bool hasSecMassStats() const
175  {
176  return (secMassStats().size() != 0);
177  }
178 
179  /// SecMassStats.
181  {
182  return SecMassStats ( getOptionalGroup (Tags::NoRelatedSym) );
183  }
184 
185  /// Indicator for stressed market conditions.
187  {
188  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MassMarketCondition);
189  }
190 
191  /// Indicator for stressed market conditions.
193  {
194  return getIntEnumFieldValue<MarketCondition>(*this, Tags::MarketCondition);
195  }
196 
197  /// LastFragment
199  {
200  return getIntEnumFieldValue<LastFragment>(*this, Tags::LastFragment);
201  }
202 
203  private:
204  friend class MassInstrumentStateChangeWrapper;
205 
206  MassInstrumentStateChange (const void* impl)
207  : Message (impl)
208  {
209  }
210  };
211  }
212  }
213 }
const Tag TESSecurityMassStatus
Definition: Tags.h:272
const Tag SecurityMassTradingEvent
Definition: Tags.h:188
SecurityTradingEvent::Enum securityTradingEvent() const
Identifies an event related to a securityTradingStatus()
UInt64 transactTime() const
Time when request was processed by the matcher (nanoseconds).
SecurityTradingStatus::Enum securityTradingStatus() const
Defines the security trading status.
MarketCondition::Enum marketCondition() const
Indicator for stressed market conditions.
SecurityStatus::Enum tesSecurityMassStatus() const
TESSecurityMassStatus.
const Tag MassSoldOutIndicator
Definition: Tags.h:271
const Tag MassMarketCondition
Definition: Tags.h:234
const Tag SecurityTradingStatus
Definition: Tags.h:61
SecurityTradingStatus::Enum securityMassTradingStatus() const
Defines the security mass trading status.
bool fastMarketIndicator() const
Indicates if product is in the state Fast Market.
const Tag InstrumentScopeProductComplex
Definition: Tags.h:115
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
MarketCondition::Enum marketCondition() const
Indicator for stressed market conditions.
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
MarketSegmentId marketSegmentId() const
Product identifier.
SoldOutIndicator::Enum soldOutIndicator() const
Identifies the sold out status (applicable for continuous auction trading model only).
SecurityId securityId() const
Instrument identifier.
SecurityStatus::Enum securityMassStatus() const
SecurityMassStatus.
const Tag SecurityMassTradingStatus
Definition: Tags.h:116
const Tag SecurityMassStatus
Definition: Tags.h:270
const Tag SecurityTradingEvent
Definition: Tags.h:189
SecurityTradingEvent::Enum securityMassTradingEvent() const
Identifies an event related to a securityMassTradingStatus().
SecurityStatus::Enum tesTradSesStatus() const
Defines the TES trading session status.
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
SecurityStatus::Enum securityStatus() const
Security Status.
const Tag FastMarketIndicator
Definition: Tags.h:143
SoldOutIndicator::Enum massSoldOutIndicator() const
MassSoldOutIndicator.
MarketCondition::Enum massMarketCondition() const
Indicator for stressed market conditions.
LastFragment::Enum lastFragment() const
LastFragment.
bool lowPx(Decimal &price) const
Lower boundary price.
InstrumentType::Enum instrumentScopeProductComplex() const
Instrument type of affected instruments.
bool highPx(Decimal &price) const
Upper boundary price.