OnixS C++ EuroTLX GTP Market Data Handler  1.4.0
API documentation
MiFIDIITrade.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 
22 #include <vector>
23 
28 
29 
30 namespace OnixS {
31 namespace EuroTLX {
32 namespace MarketData {
33 namespace GTP {
34 
35  ///
37  {
38  /// Time the message was generated.
39  UDT timestamp() const
41  {
42  return ordinary<UDT>(3);
43  }
44 
45  /// Venue from which market data is received for the instrument.
48  {
49  return enumeration<SourceVenue>(11);
50  }
51 
52  /// GTP Instrument Identifier
53  UInt64 instrumentID() const
55  {
56  return ordinary<UInt64>(13);
57  }
58 
59  /// A unique trade identifier. The value will be right aligned.
62  {
63  return fixedStr<52>(21);
64  }
65 
66  ///
69  {
70  return enumeration<TradeType>(73);
71  }
72 
73  ///
76  {
77  return enumeration<AuctionType>(74);
78  }
79 
80  /// Mifid compliant Price field populated using either Price or Yield. Will contain the text 'PNDG'
81  /// (right aligned) when there is a pending price.
84  {
85  return fixedStr<20>(75);
86  }
87 
88  /// Number of units of the financial instrument.
91  {
92  return fixedStr<20>(95);
93  }
94 
95  /// Date and time when the transaction was executed / agreed upon.
98  {
99  return fixedStr<27>(115);
100  }
101 
102  /// Instrument Identification Code Type. Only valid value will be ISIN.
105  {
106  return fixedStr<4>(142);
107  }
108 
109  /// Instrument identification number. (ISIN code)
112  {
113  return fixedStr<12>(146);
114  }
115 
116  /// Indicates if the price is expressed in monetary value, in percentage or yield.
119  {
120  return fixedStr<4>(158);
121  }
122 
123  /// Currency in which the price is expressed (applicable if the price is expressed as monetary value).
126  {
127  return fixedStr<3>(162);
128  }
129 
130  /// Notional value relevant to the security.
133  {
134  return fixedStr<20>(165);
135  }
136 
137  /// Currency in which the notional amount is denominated.
140  {
141  return fixedStr<3>(185);
142  }
143 
144  /// Identification of the venue where the transaction was executed.
147  {
148  return fixedStr<4>(188);
149  }
150 
151  /// Date and time when the transaction was published .
154  {
155  return fixedStr<27>(192);
156  }
157 
158  ///
161  {
162  return fixedStr<4>(219);
163  }
164 
165  ///
168  {
169  return fixedStr<4>(223);
170  }
171 
172  ///
175  {
176  return fixedStr<4>(227);
177  }
178 
179  ///
182  {
183  return fixedStr<4>(231);
184  }
185 
186  ///
189  {
190  return fixedStr<4>(235);
191  }
192 
193  ///
196  {
197  return fixedStr<4>(239);
198  }
199 
200  /// Indicates whether the trade will be cleared.
203  {
204  return ordinaryRef<Byte>(243);
205  }
206 
207  /// Notation of the Quantity in Measurement Unit
210  {
211  return fixedStr<3>(244);
212  }
213 
214  /// The quantity of the Measurement Unit for commodity derivatives.
217  {
218  return fixedStr<20>(247);
219  }
220 
221  /// Indicates the type of transaction.
224  {
225  return fixedStr<4>(267);
226  }
227 
228  ///
231  {
232  return enumeration<TradeQualifier>(271);
233  }
234 
235  ///
238  {
239  return enumeration<MarketMechanism>(272);
240  }
241 
242  ///
245  {
246  return enumeration<TradingMode>(273);
247  }
248 
249  ///
252  {
253  return enumeration<TransactionCategory>(274);
254  }
255 
256  ///
259  {
260  return enumeration<NegotiationIndicator>(275);
261  }
262 
263  ///
266  {
267  return enumeration<AgencyCrossIndicator>(276);
268  }
269 
270  ///
273  {
274  return enumeration<ModificationIndicator>(277);
275  }
276 
277  ///
280  {
281  return enumeration<ReferencePriceIndicator>(278);
282  }
283 
284  ///
287  {
288  return enumeration<SpecialDividendIndicator>(279);
289  }
290 
291  ///
294  {
295  return enumeration<OffBookAutomatedIndicator>(280);
296  }
297 
298  ///
301  {
302  return enumeration<PriceFormationIndicator>(281);
303  }
304 
305  ///
308  {
309  return enumeration<AlgorithmicIndicator>(282);
310  }
311 
312  ///
315  {
316  return enumeration<PostTradeDeferralReason>(283);
317  }
318 
319  ///
322  {
323  return enumeration<DeferralEnrichmentType>(284);
324  }
325 
326  ///
329  {
330  return enumeration<DuplicativeIndicator>(285);
331  }
332 
333  /// Total message size.
335 
336  /// Check the given size.
337  static void validateSize(MessageSize size)
338  {
339  if(size < messageSize_)
340  throwIncorrectSize("MiFIDIITrade", size, messageSize_);
341  }
342 
343  /// Initializes instance over given memory block.
344  MiFIDIITradeMsg(const void* data, MessageSize size)
346  : BinaryMessage(data, size)
347  {
348  }
349  };
350 
351  /// Serializes object into string.
352  ONIXS_EUROTLX_GTP_API void toStr(std::string&, const MiFIDIITradeMsg&);
353 
354  /// Serializes object into string.
355  inline std::string toStr(const MiFIDIITradeMsg& msg)
356  {
357  std::string str;
358  toStr(str, msg);
359  return str;
360  }
361 
362 }
363 }
364 }
365 }
#define ONIXS_EUROTLX_GTP_CONST_OR_CONSTEXPR
Definition: Compiler.h:46
UDT timestamp() const ONIXS_EUROTLX_GTP_NOTHROW
Time the message was generated.
Definition: MiFIDIITrade.h:39
SpecialDividendIndicator::Enum specialDividendIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:285
PostTradeDeferralReason::Enum postTradeDeferralReason() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:313
DuplicativeIndicator::Enum duplicativeIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:327
AuctionType::Enum auctionType() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:74
Alpha pTLargeInScaleFlag() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:173
BinaryMessage() ONIXS_EUROTLX_GTP_NOTHROW
Initializes blank instance referencing to nothing.
ModificationIndicator::Enum modificationIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:271
#define ONIXS_EUROTLX_GTP_NOTHROW
Definition: Compiler.h:27
static void validateSize(MessageSize size)
Check the given size.
Definition: MiFIDIITrade.h:337
NegotiationIndicator::Enum negotiationIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:257
MiFIDDecimal miFIDQuantity() const ONIXS_EUROTLX_GTP_NOTHROW
Number of units of the financial instrument.
Definition: MiFIDIITrade.h:89
Alpha instrumentIdentificationCodeType() const ONIXS_EUROTLX_GTP_NOTHROW
Instrument Identification Code Type. Only valid value will be ISIN.
Definition: MiFIDIITrade.h:103
AgencyCrossIndicator::Enum agencyCrossIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:264
Alpha pTAlgoTrade() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:180
Alpha instrumentIdentificationCode() const ONIXS_EUROTLX_GTP_NOTHROW
Instrument identification number. (ISIN code)
Definition: MiFIDIITrade.h:110
UInt64 instrumentID() const ONIXS_EUROTLX_GTP_NOTHROW
GTP Instrument Identifier.
Definition: MiFIDIITrade.h:53
PriceFormationIndicator::Enum priceFormationIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:299
UInt16 MessageSize
Aliases message length type.
Definition: Defines.h:141
Alpha pTRefPriceWaiverFlag() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:159
DateAndTime tradingDateAndTime() const ONIXS_EUROTLX_GTP_NOTHROW
Date and time when the transaction was executed / agreed upon.
Definition: MiFIDIITrade.h:96
ONIXS_EUROTLX_GTP_API void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
AlgorithmicIndicator::Enum algorithmicIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:306
Alpha pTTransTypeFlag() const ONIXS_EUROTLX_GTP_NOTHROW
Indicates the type of transaction.
Definition: MiFIDIITrade.h:222
static ONIXS_EUROTLX_GTP_CONST_OR_CONSTEXPR MessageSize messageSize_
Total message size.
Definition: MiFIDIITrade.h:334
Alpha measurementUnit() const ONIXS_EUROTLX_GTP_NOTHROW
Notation of the Quantity in Measurement Unit.
Definition: MiFIDIITrade.h:208
Alpha notionalCurrency() const ONIXS_EUROTLX_GTP_NOTHROW
Currency in which the notional amount is denominated.
Definition: MiFIDIITrade.h:138
Alpha venueofExecution() const ONIXS_EUROTLX_GTP_NOTHROW
Identification of the venue where the transaction was executed.
Definition: MiFIDIITrade.h:145
MiFIDDecimal notionalAmount() const ONIXS_EUROTLX_GTP_NOTHROW
Notional value relevant to the security.
Definition: MiFIDIITrade.h:131
TransactionCategory::Enum transactionCategory() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:250
SourceVenue::Enum sourceVenue() const ONIXS_EUROTLX_GTP_NOTHROW
Venue from which market data is received for the instrument.
Definition: MiFIDIITrade.h:46
DateAndTime publicationDateAndTime() const ONIXS_EUROTLX_GTP_NOTHROW
Date and time when the transaction was published .
Definition: MiFIDIITrade.h:152
Byte transactionToBeCleared() const ONIXS_EUROTLX_GTP_NOTHROW
Indicates whether the trade will be cleared.
Definition: MiFIDIITrade.h:201
TradeType::Enum tradeType() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:67
MiFIDIITradeMsg(const void *data, MessageSize size) ONIXS_EUROTLX_GTP_NOTHROW
Initializes instance over given memory block.
Definition: MiFIDIITrade.h:344
Alpha priceNotation() const ONIXS_EUROTLX_GTP_NOTHROW
Indicates if the price is expressed in monetary value, in percentage or yield.
Definition: MiFIDIITrade.h:117
ReferencePriceIndicator::Enum referencePriceIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:278
Alpha priceCurrency() const ONIXS_EUROTLX_GTP_NOTHROW
Currency in which the price is expressed (applicable if the price is expressed as monetary value)...
Definition: MiFIDIITrade.h:124
Alpha transactionIdentificationCode() const ONIXS_EUROTLX_GTP_NOTHROW
A unique trade identifier. The value will be right aligned.
Definition: MiFIDIITrade.h:60
Encapsulates services for manipulating little endian encoded messages.
MiFIDDecimal miFIDPrice() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:82
TradingMode::Enum tradingMode() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:243
MiFIDDecimal quantityinMeasurementUnit() const ONIXS_EUROTLX_GTP_NOTHROW
The quantity of the Measurement Unit for commodity derivatives.
Definition: MiFIDIITrade.h:215
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:45
UInt64 UDT
time stamp (in UTC) = (date time per second resolution in unix time format) * 1,000,000,000 + (nanoseconds component)
Definition: Defines.h:94
Alpha pTSizeFlag() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:166
UInt8 Byte
Alias for Byte.
Definition: Memory.h:37
OffBookAutomatedIndicator::Enum offBookAutomatedIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:292
Alpha pTCancellationFlag() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:187
MarketMechanism::Enum marketMechanism() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:236
Alpha pTAmendmentFlag() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:194
ONIXS_EUROTLX_GTP_API void toStr(std::string &, EventCode::Enum)
Appends string presentation of object.
DeferralEnrichmentType::Enum deferralEnrichmentType() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:320
TradeQualifier::Enum tradeQualifier() const ONIXS_EUROTLX_GTP_NOTHROW
Definition: MiFIDIITrade.h:229