OnixS C++ EuroTLX GTP Market Data Handler  1.4.0
API documentation
StatisticsSnapshot.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  /// GTP Instrument identifier.
46  UInt64 instrument() const
48  {
49  return ordinary<UInt64>(11);
50  }
51 
52  /// Source venue.
55  {
56  return enumeration<SourceVenue>(19);
57  }
58 
59  /// Cumulative volume of all trades for the trading day.
60  Size4 volume() const
62  {
63  return Size4(ordinary<UInt64>(21));
64  }
65 
66  /// Cumulative volume for the trading day excluding off-book trades.
69  {
70  return Size4(ordinary<UInt64>(29));
71  }
72 
73  /// Volume weighted average price for the day for all trades.
74  Price4 vwap() const
76  {
77  return Price4(ordinary<UInt64>(37));
78  }
79 
80  /// Volume weighted average price for the day excluding off-book trades.
83  {
84  return Price4(ordinary<UInt64>(45));
85  }
86 
87  /// Count of all trades for the day.
88  UInt32 numberOfTrades() const
90  {
91  return ordinary<UInt32>(53);
92  }
93 
94  /// Count of trades for the day excluding off-book trades.
95  UInt32 numberOfTradesOnBookOnly() const
97  {
98  return ordinary<UInt32>(57);
99  }
100 
101  /// Turnover of all trades for the day.
102  Price4 turnover() const
104  {
105  return Price4(ordinary<UInt64>(61));
106  }
107 
108  /// Turnover for the day excluding off-book trades.
111  {
112  return Price4(ordinary<UInt64>(69));
113  }
114 
115  /// Official Opening Price for the instrument.
118  {
119  return Price(ordinary<UInt64>(77));
120  }
121 
122  /// Official Closing Price for the instrument.
125  {
126  return Price(ordinary<UInt64>(85));
127  }
128 
129  /// Current trading day high price excluding off-book trades.
132  {
133  return Price(ordinary<UInt64>(93));
134  }
135 
136  /// Current trading day low price excluding off-book trades.
139  {
140  return Price(ordinary<UInt64>(101));
141  }
142 
143  /// Current trading day high price of all trades.
144  Price tradeHigh() const
146  {
147  return Price(ordinary<UInt64>(109));
148  }
149 
150  /// Current trading day low price of all trades.
151  Price tradeLow() const
153  {
154  return Price(ordinary<UInt64>(117));
155  }
156 
157  /// 52-week high price of all trades.
160  {
161  return Price(ordinary<UInt64>(125));
162  }
163 
164  /// 52-week low price of all trades.
167  {
168  return Price(ordinary<UInt64>(133));
169  }
170 
171  ///
174  {
175  return ordinaryRef<Byte>(141);
176  }
177 
178  ///
181  {
182  return ordinaryRef<Byte>(142);
183  }
184 
185  /// Contains the last reported Indicative Auction Crossing Price/Yield.
186  Price iAUPrice() const
188  {
189  return Price(ordinary<UInt64>(143));
190  }
191 
192  /// Quantity to be matched at the last reported indicative price.
195  {
196  return Size(ordinary<UInt64>(151));
197  }
198 
199  /// Quantity that was eligible to be matched at the indicative price but was not to be matched at the
200  /// last indicative price.
203  {
204  return Size(ordinary<UInt64>(159));
205  }
206 
207  /// Imbalance Direction.
210  {
211  return enumeration<ImbalanceDirection>(167);
212  }
213 
214  /// The best bid price at the time the instrument moves into closing auction session.
217  {
218  return Price(ordinary<UInt64>(168));
219  }
220 
221  /// The best offer price at the time the instrument moves into closing auction session.
224  {
225  return Price(ordinary<UInt64>(176));
226  }
227 
228  /// The best bid size at the time the instrument moves into closing auction session.
231  {
232  return Size(ordinary<UInt64>(184));
233  }
234 
235  /// The best offer size at the time the instrument moves into closing auction session.
238  {
239  return Size(ordinary<UInt64>(192));
240  }
241 
242  /// Current trading day high price of off-book trades.
245  {
246  return Price(ordinary<UInt64>(200));
247  }
248 
249  /// Current trading day low price of off-book trades.
252  {
253  return Price(ordinary<UInt64>(208));
254  }
255 
256  /// Total of unsettled derivatives contracts.
259  {
260  return Size(ordinary<UInt64>(216));
261  }
262 
263  /// Derivatives volatility.
266  {
267  return Price(ordinary<UInt64>(224));
268  }
269 
270  /// Auction Type
273  {
274  return enumeration<AuctionType>(232);
275  }
276 
277  /// Executed price at which the instrument was last traded. If no relevant trades have taken place the
278  /// value 0 will be populated.
281  {
282  return Price(ordinary<UInt64>(233));
283  }
284 
285  /// Executed quantity of the trade which set the Last Trade Price. If no relevant trades have taken
286  /// place the value 0 will be populated.
289  {
290  return Size(ordinary<UInt64>(241));
291  }
292 
293  /// Transaction time of the trade which set the Last Trade Price. If no relevant trades have taken place
294  /// the value 0 will be populated.
297  {
298  return ordinary<UDT>(249);
299  }
300 
301  /// Reference Price as reported by the source venue. (Specific to BIT/TLX)
304  {
305  return Price(ordinary<UInt64>(257));
306  }
307 
308  /// Reference Price as reported by the source venue. (Specific to BIT/TLX)
311  {
312  return Price(ordinary<UInt64>(265));
313  }
314 
315  /// Total message size.
317 
318  /// Check the given size.
319  static void validateSize(MessageSize size)
320  {
321  if(size < messageSize_)
322  throwIncorrectSize("StatisticsSnapshot", size, messageSize_);
323  }
324 
325  /// Initializes instance over given memory block.
326  StatisticsSnapshotMsg(const void* data, MessageSize size)
328  : BinaryMessage(data, size)
329  {
330  }
331  };
332 
333  /// Serializes object into string.
334  ONIXS_EUROTLX_GTP_API void toStr(std::string&, const StatisticsSnapshotMsg&);
335 
336  /// Serializes object into string.
337  inline std::string toStr(const StatisticsSnapshotMsg& msg)
338  {
339  std::string str;
340  toStr(str, msg);
341  return str;
342  }
343 
344 }
345 }
346 }
347 }
AuctionType::Enum auctionType() const ONIXS_EUROTLX_GTP_NOTHROW
Auction Type.
#define ONIXS_EUROTLX_GTP_CONST_OR_CONSTEXPR
Definition: Compiler.h:46
Price dynamicReferencePrice() const ONIXS_EUROTLX_GTP_NOTHROW
Reference Price as reported by the source venue. (Specific to BIT/TLX)
Price tradeLowOffBook() const ONIXS_EUROTLX_GTP_NOTHROW
Current trading day low price of off-book trades.
Price4 turnover() const ONIXS_EUROTLX_GTP_NOTHROW
Turnover of all trades for the day.
Price tradeHighOnBookOnly() const ONIXS_EUROTLX_GTP_NOTHROW
Current trading day high price excluding off-book trades.
Price officialClosingPrice() const ONIXS_EUROTLX_GTP_NOTHROW
Official Closing Price for the instrument.
BinaryMessage() ONIXS_EUROTLX_GTP_NOTHROW
Initializes blank instance referencing to nothing.
Price tradeLowOnBookOnly() const ONIXS_EUROTLX_GTP_NOTHROW
Current trading day low price excluding off-book trades.
static void validateSize(MessageSize size)
Check the given size.
#define ONIXS_EUROTLX_GTP_NOTHROW
Definition: Compiler.h:27
FixedPointDecimal< Int64, IntegralConstant< Int8,-4 > > Price4
Signed Little-Endian encoded 64bit integer field with four implied decimal places.
Definition: Defines.h:120
Price4 vwap() const ONIXS_EUROTLX_GTP_NOTHROW
Volume weighted average price for the day for all trades.
UDT lastTradeTime() const ONIXS_EUROTLX_GTP_NOTHROW
FixedPointDecimal< UInt64, IntegralConstant< Int8,-4 > > Size4
Little-Endian encoded 64 bit unsigned integer with four implied decimal places.
Definition: Defines.h:129
Price tradeLow() const ONIXS_EUROTLX_GTP_NOTHROW
Current trading day low price of all trades.
Size4 volume() const ONIXS_EUROTLX_GTP_NOTHROW
Cumulative volume of all trades for the trading day.
FixedPointDecimal< Int64, IntegralConstant< Int8,-8 > > Price
Signed Little-Endian encoded 64bit integer field with eight implied decimal places.
Definition: Defines.h:102
Price officialOpeningPrice() const ONIXS_EUROTLX_GTP_NOTHROW
Official Opening Price for the instrument.
Byte closingPriceIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
UInt16 MessageSize
Aliases message length type.
Definition: Defines.h:141
Price bestClosingAskPrice() const ONIXS_EUROTLX_GTP_NOTHROW
The best offer price at the time the instrument moves into closing auction session.
Size imbalanceQuantity() const ONIXS_EUROTLX_GTP_NOTHROW
Size openInterest() const ONIXS_EUROTLX_GTP_NOTHROW
Total of unsettled derivatives contracts.
ONIXS_EUROTLX_GTP_API void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
Price volatility() const ONIXS_EUROTLX_GTP_NOTHROW
Derivatives volatility.
FixedPointDecimal< UInt64, IntegralConstant< Int8,-8 > > Size
Little-Endian encoded 64 bit unsigned integer with eight implied decimal places.
Definition: Defines.h:111
Price4 turnoverOnBookOnly() const ONIXS_EUROTLX_GTP_NOTHROW
Turnover for the day excluding off-book trades.
Size bestClosingAskSize() const ONIXS_EUROTLX_GTP_NOTHROW
The best offer size at the time the instrument moves into closing auction session.
Price iAUPrice() const ONIXS_EUROTLX_GTP_NOTHROW
Contains the last reported Indicative Auction Crossing Price/Yield.
SourceVenue::Enum sourceVenue() const ONIXS_EUROTLX_GTP_NOTHROW
Source venue.
Size lastTradeQuantity() const ONIXS_EUROTLX_GTP_NOTHROW
Price tradeHigh() const ONIXS_EUROTLX_GTP_NOTHROW
Current trading day high price of all trades.
Price tradeHighOffBook() const ONIXS_EUROTLX_GTP_NOTHROW
Current trading day high price of off-book trades.
StatisticsSnapshotMsg(const void *data, MessageSize size) ONIXS_EUROTLX_GTP_NOTHROW
Initializes instance over given memory block.
Byte openingPriceIndicator() const ONIXS_EUROTLX_GTP_NOTHROW
Price bestClosingBidPrice() const ONIXS_EUROTLX_GTP_NOTHROW
The best bid price at the time the instrument moves into closing auction session. ...
Size bestClosingBidSize() const ONIXS_EUROTLX_GTP_NOTHROW
The best bid size at the time the instrument moves into closing auction session.
UInt32 numberOfTrades() const ONIXS_EUROTLX_GTP_NOTHROW
Count of all trades for the day.
Encapsulates services for manipulating little endian encoded messages.
Price tradeHigh52week() const ONIXS_EUROTLX_GTP_NOTHROW
52-week high price of all trades.
UInt32 numberOfTradesOnBookOnly() const ONIXS_EUROTLX_GTP_NOTHROW
Count of trades for the day excluding off-book trades.
Size iAUPairedSize() const ONIXS_EUROTLX_GTP_NOTHROW
Quantity to be matched at the last reported indicative price.
ImbalanceDirection::Enum imbalanceDirection() const ONIXS_EUROTLX_GTP_NOTHROW
Imbalance Direction.
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
Size4 volumeOnBookOnly() const ONIXS_EUROTLX_GTP_NOTHROW
Cumulative volume for the trading day excluding off-book trades.
UInt8 Byte
Alias for Byte.
Definition: Memory.h:37
static ONIXS_EUROTLX_GTP_CONST_OR_CONSTEXPR MessageSize messageSize_
Total message size.
UInt64 instrument() const ONIXS_EUROTLX_GTP_NOTHROW
GTP Instrument identifier.
Price lastTradePrice() const ONIXS_EUROTLX_GTP_NOTHROW
Price tradeLow52week() const ONIXS_EUROTLX_GTP_NOTHROW
52-week low price of all trades.
UDT timestamp() const ONIXS_EUROTLX_GTP_NOTHROW
Time the message was generated.
ONIXS_EUROTLX_GTP_API void toStr(std::string &, EventCode::Enum)
Appends string presentation of object.
Price4 vwapOnBookOnly() const ONIXS_EUROTLX_GTP_NOTHROW
Volume weighted average price for the day excluding off-book trades.
Price staticReferencePrice() const ONIXS_EUROTLX_GTP_NOTHROW
Reference Price as reported by the source venue. (Specific to BIT/TLX)