OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  8.1.0
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  /// Total Number Of Trades
140  bool totalNumOfTrades(UInt32& val) const
141  {
142  return getGroup (Tags::NoMDEntries).at(0).get(Tags::TotalNumOfTrades).toNumber(val);
143  }
144 
145  /// Quantity of orders that are deleted due to a SMP event.
146  bool restingCxlQty (Decimal& quantity) const
147  {
148  return getGroup (Tags::NoMDEntries).at (0).get (Tags::RestingCxlQty).toNumber (quantity);
149  }
150 
151  /// Represents the match step (unique together with SenderCompID).
152  bool mdEntryId (UInt32 id) const
153  {
154  return getGroup (Tags::NoMDEntries).at (0).get (Tags::MDEntryID).toNumber(id);
155  }
156 
157  /// 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.
159  {
160  return getGroup (Tags::NoMDEntries).at (0).get (Tags::NonDisclosedTradeVolume).toNumber (id);
161  }
162 
163  /// Algorithmic-Trade-Indicator
165  {
166  return getNonZeroIntEnumFieldValue<AlgorithmicTradeIndicator>(*this, Tags::AlgorithmicTradeIndicator);
167  }
168 
169  /// MultiLegReportingType
171  {
172  return getNonZeroIntEnumFieldValue<MultiLegReportingType>(*this, Tags::MultiLegReportingType);
173  }
174 
175  /// MultiLegPriceModel
177  {
178  return getIntEnumFieldValue<MultiLegPriceModel>(*this, Tags::MultiLegPriceModel);
179  }
180 
181  /// PartyID
182  bool partyID(StringRef& val) const
183  {
185  return (parties) ? parties.at(0).get (Tags::PartyID).toStringRef(val) : false;
186  }
187 
188  /// PartyIDSource
189  bool partyIDSource(StringRef& val) const
190  {
192  return (parties) ? val = StringRef("G"), true : false;
193  }
194 
195  /// PartyRole
196  bool partyRole(UInt32& val) const
197  {
199  return (parties) ? val = 73, true : false;
200  }
201 
202  private:
203  friend class ExchangeTradeWrapper;
204 
205  ExchangeTrade (const void* impl)
206  : Message (impl)
207  {
208  }
209  };
210  }
211  }
212 }
const GroupInstance at(size_t index) const
Definition: Group.cpp:104
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
Group getOptionalGroup(Tag numberOfInstancesTag) const
Definition: FieldSet.cpp:295
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
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
FieldValueRef get(Tag tag) const
Definition: FieldSet.cpp:122
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).