OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.3
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 snapshot 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::AggressorTimestamp).toNumber (time);
146  }
147 
148  /// Request time.
149  bool RequestTime (UInt64& time) const
150  {
151  return get (Tags::RequestTime).toNumber (time);
152  }
153 
154  /// Side of the incoming order, which created the trade. Only present for MDEntryType=Trade.
156  {
157  return getNonZeroIntEnumFieldValue<Side> (*this, Tags::AggressorSide);
158  }
159 
160  /// Number of buy orders involved in this trade.
161  ///
162  /// @note Only present for MDEntryType = Trade.
163  bool numberOfBuyOrders (UInt32& number) const
164  {
165  return get (Tags::NumberOfBuyOrders).toNumber (number);
166  }
167 
168  /// Number of sell orders involved in this trade.
169  ///
170  /// @note Only present for MDEntryType = Trade.
171  bool numberOfSellOrders (UInt32& number) const
172  {
173  return get (Tags::NumberOfSellOrders).toNumber (number);
174  }
175 
176  /// Total Number Of Trades.
177  ///
178  /// @note Only present for MDEntryType = Trade.
179  bool totalNumOfTrades (UInt32& number) const
180  {
181  return get (Tags::TotalNumOfTrades).toNumber (number);
182  }
183 
184  /// Quantity of orders, that are deleted due to a SMP event.
185  ///
186  /// @note Only present for MDEntryType = Trade.
187  bool restingCxlQty (Decimal& quantity) const
188  {
189  return get (Tags::RestingCxlQty).toNumber (quantity);
190  }
191 
192  /// Represents the match step (unique together with SenderCompID).
193  ///
194  /// @note Only present for MDEntryType = Trade.
195  bool mdEntryId (UInt32& id) const
196  {
197  return get (Tags::MDEntryID).toNumber (id);
198  }
199 
200  /// 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.
202  {
203  return get (Tags::NonDisclosedTradeVolume).toNumber (id);
204  }
205 
206  private:
208 
209  MDIncrementalEntry (const GroupInstance& groupInstance)
210  : GroupInstance (groupInstance)
211  {
212  }
213  };
214 
215  class MDIncrementalEntries : public TypedGroup<MDIncrementalEntry>
216  {
217  private:
218  explicit
219  MDIncrementalEntries (const Group& group)
221  {
222  }
223 
224  friend class DepthIncremental;
225  };
226 
227  /// Depth incremental
228  class ONIXS_EUREX_EMDI_API DepthIncremental : public Message
229  {
230  public:
231 
232  /// Product identifier.
234  {
235  return getUInt32 (Tags::MarketSegmentID);
236  }
237 
238  /// Entries.
240  {
241  return MDIncrementalEntries ( getGroup (Tags::NoMDEntries) );
242  }
243 
244  private:
246 
247  DepthIncremental (const void* impl)
248  : Message (impl)
249  {
250  }
251  };
252  }
253  }
254 }
bool numberOfSellOrders(UInt32 &number) const
const Tag NumberOfSellOrders
Definition: Tags.h:153
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:209
bool totalNumOfTrades(UInt32 &number) const
MultiLegPriceModel::Enum multiLegPriceModel() const
MultiLegPriceModel.
const Tag MultiLegReportingType
Definition: Tags.h:255
bool mdEntryPx(Decimal &price) const
Price.
const Tag AlgorithmicTradeIndicator
Definition: Tags.h:254
AlgorithmicTradeIndicator::Enum algorithmicTradeIndicator() const
Algorithmic-Trade-Indicator.
const Tag AggressorTimestamp
Definition: Tags.h:151
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
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.
MultiLegReportingType::Enum multiLegReportingType() const
MultiLegReportingType.
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:256
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:211
bool numberOfOrders(UInt32 &number) const
Number Of Orders.
bool RequestTime(UInt64 &time) const
Request time.