OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  17.0.1
API documentation
DepthIncremental.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  /// Market data incremental entry.
35  class ONIXS_EUREX_EMDI_API MDIncrementalEntry : GroupInstance
36  {
37  public:
38 
39  /// Origin type.
41  {
42  return getIntEnumFieldValue<MDOriginType> (*this, Tags::MDOriginType);
43  }
44 
45  /// Update action.
47  {
48  return getIntEnumFieldValue<MDUpdateAction> (*this, Tags::MDUpdateAction);
49  }
50 
51  /// Defines the entry type.
53  {
54  return getIntEnumFieldValue<MDEntryType> (*this, Tags::MDEntryType);
55  }
56 
57  /// Instrument identifier.
59  {
60  return getInt64 (Tags::SecurityID);
61  }
62 
63  /// Price.
64  bool mdEntryPx (Decimal& price) const
65  {
66  return get (Tags::MDEntryPx).toNumber (price);
67  }
68 
69  /// Quantity.
70  bool mdEntrySize (Decimal& size) const
71  {
72  return get (Tags::MDEntrySize).toNumber (size);
73  }
74 
75  /// Number Of Orders.
76  bool numberOfOrders (UInt32& number) const
77  {
78  return get (Tags::NumberOfOrders).toNumber (number);
79  }
80 
81  /// Book level.
82  ///
83  /// @note Absent for implied bid/offer prices.
84  bool mdPriceLevel (UInt32& level) const
85  {
86  return get (Tags::MDPriceLevel).toNumber (level);
87  }
88 
89  /// For bids and offers the official time of book entry, for trades official time of execution (all in nanoseconds).
90  bool mdEntryTime (UInt64& time) const
91  {
92  return get (Tags::MDEntryTime).toNumber (time);
93  }
94 
95  /// Potential security trading event.
97  {
98  return getIntEnumFieldValue<SecurityTradingEvent> (*this, Tags::PotentialSecurityTradingEvent);
99  }
100 
101  /// Potential security trading event.
103  {
104  return getIntEnumFieldValue<QuoteCondition> (*this, Tags::QuoteCondition);
105  }
106 
107  /// Defines when the trade happens.
108  ///
109  /// Only present for MDEntryType=Trade and TradeCondition=AW.
111  {
112  return getIntEnumFieldValue<TrdType> (*this, Tags::TrdType);
113  }
114 
115  /// Algorithmic-Trade-Indicator
117  {
118  return getNonZeroIntEnumFieldValue<AlgorithmicTradeIndicator>(*this, Tags::AlgorithmicTradeIndicator);
119  }
120 
121  /// Defines the trade condition.
122  ///
123  /// @note Defines the type of price for MDEntryPx. Only present for MDEntryType=Trade.
125  {
126  UInt64 value;
127  return (get (Tags::TradeCondition).toNumber (value) ? TradeConditionSet (value) : TradeConditionSet (0) );
128  }
129 
130  /// MultiLegReportingType
132  {
133  return getNonZeroIntEnumFieldValue<MultiLegReportingType>(*this, Tags::MultiLegReportingType);
134  }
135 
136  /// MultiLegPriceModel
138  {
139  return getIntEnumFieldValue<MultiLegPriceModel>(*this, Tags::MultiLegPriceModel);
140  }
141 
142  /// Entry time of the incoming order that triggered the trade. Only present for MDEntryType=Trade.
143  bool aggressorTimestamp (UInt64& time) const
144  {
145  return get (Tags::AggressorTime).toNumber (time);
146  }
147 
148  /// Request time.
149  bool requestTime (UInt64& time) const
150  {
151  return get (Tags::RequestTime).toNumber (time);
152  }
153 
154  ///
155  bool transBkdTime (UInt64& time) const
156  {
157  return get (Tags::TransBkdTime).toNumber (time);
158  }
159 
160  /// Side of the incoming order, which created the trade. Only present for MDEntryType=Trade.
162  {
163  return getNonZeroIntEnumFieldValue<Side> (*this, Tags::AggressorSide);
164  }
165 
166  /// Number of buy orders involved in this trade.
167  ///
168  /// @note Only present for MDEntryType = Trade.
169  bool numberOfBuyOrders (UInt32& number) const
170  {
171  return get (Tags::NumberOfBuyOrders).toNumber (number);
172  }
173 
174  /// Number of sell orders involved in this trade.
175  ///
176  /// @note Only present for MDEntryType = Trade.
177  bool numberOfSellOrders (UInt32& number) const
178  {
179  return get (Tags::NumberOfSellOrders).toNumber (number);
180  }
181 
182  ///
183  bool numberOfBuySides (UInt32& number) const
184  {
185  return get (Tags::NumberOfBuySides).toNumber (number);
186  }
187 
188  ///
189  bool numberOfSellSides (UInt32& number) const
190  {
191  return get (Tags::NumberOfSellSides).toNumber (number);
192  }
193 
194  /// Total Number Of Trades.
195  ///
196  /// @note Only present for MDEntryType = Trade.
197  bool totalNumOfTrades (UInt32& number) const
198  {
199  return get (Tags::TotalNumOfTrades).toNumber (number);
200  }
201 
202  /// Quantity of orders, that are deleted due to a SMP event.
203  ///
204  /// @note Only present for MDEntryType = Trade.
205  bool restingCxlQty (Decimal& quantity) const
206  {
207  return get (Tags::RestingCxlQty).toNumber (quantity);
208  }
209 
210  /// Represents the match step (unique together with SenderCompID).
211  ///
212  /// @note Only present for MDEntryType = Trade.
213  bool mdEntryId (UInt32& id) const
214  {
215  return get (Tags::MDEntryID).toNumber (id);
216  }
217 
218  /// Contains the TES trade volume that is not displayed during the day. Only present for MDEntryType=B "Trade Volume". Used when trade volume is finally disclosed and also for recovery.
220  {
221  return get (Tags::NonDisclosedTradeVolume).toNumber (id);
222  }
223 
224  private:
226 
227  MDIncrementalEntry (const GroupInstance& groupInstance)
228  : GroupInstance (groupInstance)
229  {
230  }
231  };
232 
233  class MDIncrementalEntries : public TypedGroup<MDIncrementalEntry>
234  {
235  private:
236  explicit
237  MDIncrementalEntries (const Group& group)
239  {
240  }
241 
242  friend class DepthIncremental;
243  };
244 
245  /// Depth incremental
246  class ONIXS_EUREX_EMDI_API DepthIncremental : public Message
247  {
248  public:
249 
250  /// Product identifier.
252  {
253  return getUInt32 (Tags::MarketSegmentID);
254  }
255 
256  /// Entries.
258  {
259  return MDIncrementalEntries ( getGroup (Tags::NoMDEntries) );
260  }
261 
262  private:
263  friend class DepthIncrementalWrapper;
264 
265  DepthIncremental (const void* impl)
266  : Message (impl)
267  {
268  }
269  };
270  }
271  }
272 }
bool numberOfSellOrders(UInt32 &number) const
const Tag NumberOfSellOrders
Definition: Tags.h:137
Side::Enum aggressorSide() const
Side of the incoming order, which created the trade. Only present for MDEntryType=Trade.
SecurityId securityId() const
Instrument identifier.
bool restingCxlQty(Decimal &quantity) const
MDOriginType::Enum mdOriginType() const
Origin type.
const Tag PotentialSecurityTradingEvent
Definition: Tags.h:191
bool totalNumOfTrades(UInt32 &number) const
MultiLegPriceModel::Enum multiLegPriceModel() const
MultiLegPriceModel.
const Tag MultiLegReportingType
Definition: Tags.h:236
bool mdEntryPx(Decimal &price) const
Price.
const Tag AlgorithmicTradeIndicator
Definition: Tags.h:235
AlgorithmicTradeIndicator::Enum algorithmicTradeIndicator() const
Algorithmic-Trade-Indicator.
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
bool numberOfSellSides(UInt32 &number) const
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
bool nonDisclosedTradeVolume(Decimal &id) const
Contains the TES trade volume that is not displayed during the day. Only present for MDEntryType=B "T...
bool mdEntrySize(Decimal &size) const
Quantity.
bool numberOfBuyOrders(UInt32 &number) const
bool mdEntryTime(UInt64 &time) const
For bids and offers the official time of book entry, for trades official time of execution (all in na...
bool aggressorTimestamp(UInt64 &time) const
Entry time of the incoming order that triggered the trade. Only present for MDEntryType=Trade.
bool requestTime(UInt64 &time) const
Request time.
MultiLegReportingType::Enum multiLegReportingType() const
MultiLegReportingType.
bool numberOfBuySides(UInt32 &number) const
MDUpdateAction::Enum mdUpdateAction() const
Update action.
QuoteCondition::Enum quoteCondition() const
Potential security trading event.
SecurityTradingEvent::Enum potentialSecurityTradingEvent() const
Potential security trading event.
MarketSegmentId marketSegmentId() const
Product identifier.
const Tag MultiLegPriceModel
Definition: Tags.h:237
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
MDEntryType::Enum mdEntryType() const
Defines the entry type.
MDIncrementalEntries mdEntries() const
Entries.
const Tag NonDisclosedTradeVolume
Definition: Tags.h:193
bool numberOfOrders(UInt32 &number) const
Number Of Orders.