OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  17.0.1
API documentation
ExchangeTrade.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 
28 
29 namespace OnixS
30 {
31  namespace Eurex
32  {
33  namespace MarketData
34  {
35  /// Exchange Trade
36  class ONIXS_EUREX_EMDI_API ExchangeTrade : public Message
37  {
38  public:
39 
40  /// MsgSeqNum
41  UInt32 msgSeqNum() const
42  {
43  return getUInt32 (Tags::MsgSeqNum);
44  }
45 
46  /// Unique ID of a sender
48  {
49  return getUInt32 (Tags::SenderCompID);
50  }
51 
52  /// Product identifier.
54  {
55  return getUInt32 (Tags::MarketSegmentID);
56  }
57 
58  /// Origin type.
60  {
61  return getIntEnumFieldValue<MDOriginType> (getGroup (Tags::NoMDEntries).at (0), Tags::MDOriginType);
62  }
63 
64  /// Update action.
66  {
67  return getIntEnumFieldValue<MDUpdateAction> (getGroup (Tags::NoMDEntries).at (0), Tags::MDUpdateAction);
68  }
69 
70  /// Update action.
72  {
73  return getIntEnumFieldValue<MDEntryType> (getGroup (Tags::NoMDEntries).at (0), Tags::MDEntryType);
74  }
75 
76  /// Instrument ID from Eurex Exchange�s new trading architecture
78  {
79  return getGroup (Tags::NoMDEntries).at (0).getInt64 (Tags::SecurityID);
80  }
81 
82  /// Trade Price
83  bool mdEntryPx (Decimal& price) const
84  {
85  return getGroup (Tags::NoMDEntries).at (0).get (Tags::MDEntryPx).toNumber (price);
86  }
87 
88  /// Trade Quantity
89  bool mdEntrySize(Decimal& size) const
90  {
91  return getGroup (Tags::NoMDEntries).at (0).get (Tags::MDEntrySize).toNumber (size);
92  }
93 
94  /// Time of entry (nanoseconds)
95  bool mdEntryTime(Int64& val) const
96  {
97  return getGroup (Tags::NoMDEntries).at(0).get(Tags::MDEntryTime).toNumber(val);
98  }
99 
100  /// Trade Type
102  {
103  return getIntEnumFieldValue<TrdType> (getGroup (Tags::NoMDEntries).at (0), Tags::TrdType);
104  }
105 
106  /// Defines the type of price for MDEntryPx.
108  {
109  UInt64 value;
110  return (getGroup (Tags::NoMDEntries).at (0).get (Tags::TradeCondition).toNumber (value) ?
111  TradeConditionSet (value) :
112  TradeConditionSet (0) );
113  }
114 
115  /// Entry time of the incoming order that triggered the trade.
116  bool aggressorTime (UInt64& time) const
117  {
118  return getGroup (Tags::NoMDEntries).at (0).get (Tags::AggressorTime).toNumber (time);
119  }
120 
121  /// Side of the incoming order, which created the trade. Only present for MDEntryType=Trade.
123  {
124  return getNonZeroIntEnumFieldValue<Side> (getGroup (Tags::NoMDEntries).at (0), Tags::AggressorSide);
125  }
126 
127  /// Number of buy orders involved in this trade.
128  bool numberOfBuyOrders (UInt32& number) const
129  {
130  return getGroup (Tags::NoMDEntries).at (0).get (Tags::NumberOfBuyOrders).toNumber (number);
131  }
132 
133  /// Number of sell orders involved in this trade.
134  bool numberOfSellOrders (UInt32& number) const
135  {
136  return getGroup (Tags::NoMDEntries).at (0).get (Tags::NumberOfSellOrders).toNumber (number);
137  }
138 
139  /// Number of buy sides involved in an off exchange trade. Only present for MDOriginType 1 = Off-Book.
140  bool mumberOfBuySides(UInt32& number) const
141  {
142  return getGroup(Tags::NoMDEntries).at(0).get(Tags::NumberOfBuySides).toNumber(number);
143  }
144 
145  /// Number of sell sides involved in an off exchange trade. Only present for MDOriginType 1 = Off-Book.
146  bool numberOfSellSides(UInt32& val) const
147  {
148  return getGroup(Tags::NoMDEntries).at(0).get(Tags::NumberOfSellSides).toNumber(val);
149  }
150 
151  /// Total Number Of Trades
152  bool totalNumOfTrades(UInt32& val) const
153  {
154  return getGroup (Tags::NoMDEntries).at(0).get(Tags::TotalNumOfTrades).toNumber(val);
155  }
156 
157  /// Quantity of orders that are deleted due to a SMP event.
158  bool restingCxlQty (Decimal& quantity) const
159  {
160  return getGroup (Tags::NoMDEntries).at (0).get (Tags::RestingCxlQty).toNumber (quantity);
161  }
162 
163  /// Represents the match step (unique together with SenderCompID).
164  bool mdEntryId (UInt32 id) const
165  {
166  return getGroup (Tags::NoMDEntries).at (0).get (Tags::MDEntryID).toNumber(id);
167  }
168 
169  /// 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.
171  {
172  return getGroup (Tags::NoMDEntries).at (0).get (Tags::NonDisclosedTradeVolume).toNumber (id);
173  }
174 
175  /// Algorithmic-Trade-Indicator
177  {
178  return getNonZeroIntEnumFieldValue<AlgorithmicTradeIndicator>(*this, Tags::AlgorithmicTradeIndicator);
179  }
180 
181  /// MultiLegReportingType
183  {
184  return getNonZeroIntEnumFieldValue<MultiLegReportingType>(*this, Tags::MultiLegReportingType);
185  }
186 
187  /// MultiLegPriceModel
189  {
190  return getIntEnumFieldValue<MultiLegPriceModel>(*this, Tags::MultiLegPriceModel);
191  }
192 
193  /// PartyID
194  bool partyID(StringRef& val) const
195  {
197  return (parties) ? parties.at(0).get (Tags::PartyID).toStringRef(val) : false;
198  }
199 
200  /// PartyIDSource
201  bool partyIDSource(StringRef& val) const
202  {
204  return (parties) ? val = StringRef("G"), true : false;
205  }
206 
207  /// PartyRole
208  bool partyRole(UInt32& val) const
209  {
211  return (parties) ? val = 73, true : false;
212  }
213 
214  private:
215  friend class ExchangeTradeWrapper;
216 
217  ExchangeTrade (const void* impl)
218  : Message (impl)
219  {
220  }
221  };
222  }
223  }
224 }
const GroupInstance at(size_t index) const
MultiLegReportingType::Enum multiLegReportingType() const
MultiLegReportingType.
const Tag NumberOfSellOrders
Definition: Tags.h:137
bool partyIDSource(StringRef &val) const
PartyIDSource.
bool aggressorTime(UInt64 &time) const
Entry time of the incoming order that triggered the trade.
bool partyID(StringRef &val) const
PartyID.
bool numberOfSellOrders(UInt32 &number) const
Number of sell orders involved in this trade.
MultiLegPriceModel::Enum multiLegPriceModel() const
MultiLegPriceModel.
MDOriginType::Enum mdOriginType() const
Origin type.
Definition: ExchangeTrade.h:59
SecurityId securityId() const
Instrument ID from Eurex Exchange�s new trading architecture.
Definition: ExchangeTrade.h:77
const Tag MultiLegReportingType
Definition: Tags.h:236
bool mumberOfBuySides(UInt32 &number) const
Number of buy sides involved in an off exchange trade. Only present for MDOriginType 1 = Off-Book...
Group getOptionalGroup(Tag numberOfInstancesTag) const
const Tag AlgorithmicTradeIndicator
Definition: Tags.h:235
bool mdEntryTime(Int64 &val) const
Time of entry (nanoseconds)
Definition: ExchangeTrade.h:95
MarketSegmentId marketSegmentId() const
Product identifier.
Definition: ExchangeTrade.h:53
bool restingCxlQty(Decimal &quantity) const
Quantity of orders that are deleted due to a SMP event.
TrdType::Enum trdType() const
Trade Type.
unsigned int UInt32
Definition: Numeric.h:41
bool toStringRef(StringRef &) const
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
bool numberOfSellSides(UInt32 &val) const
Number of sell sides involved in an off exchange trade. Only present for MDOriginType 1 = Off-Book...
FieldValueRef get(Tag tag) const
MDEntryType::Enum mdEntryType() const
Update action.
Definition: ExchangeTrade.h:71
UInt32 msgSeqNum() const
MsgSeqNum.
Definition: ExchangeTrade.h:41
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
TradeConditionSet tradeCondition() const
Defines the type of price for MDEntryPx.
MDUpdateAction::Enum mdUpdateAction() const
Update action.
Definition: ExchangeTrade.h:65
AlgorithmicTradeIndicator::Enum algorithmicTradeIndicator() const
Algorithmic-Trade-Indicator.
bool totalNumOfTrades(UInt32 &val) const
Total Number Of Trades.
bool nonDisclosedTradeVolume(Decimal &id) const
Contains the TES trade volume that is not displayed during the day. Only present for MDEntryType=B "T...
bool mdEntryPx(Decimal &price) const
Trade Price.
Definition: ExchangeTrade.h:83
Side::Enum aggressorSide() const
Side of the incoming order, which created the trade. Only present for MDEntryType=Trade.
bool numberOfBuyOrders(UInt32 &number) const
Number of buy orders involved in this trade.
const Tag MultiLegPriceModel
Definition: Tags.h:237
UInt32 MarketSegmentId
Alias for Market Segment ID type.
Definition: Defines.h:40
UInt32 senderCompID() const
Unique ID of a sender.
Definition: ExchangeTrade.h:47
bool partyRole(UInt32 &val) const
PartyRole.
const Tag NonDisclosedTradeVolume
Definition: Tags.h:193
bool mdEntrySize(Decimal &size) const
Trade Quantity.
Definition: ExchangeTrade.h:89
bool mdEntryId(UInt32 id) const
Represents the match step (unique together with SenderCompID).