OnixS C++ EuroTLX GTP Market Data Handler  1.4.0
API documentation
InstrumentDirectory.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  /// ISIN code of the instrument.
53  Alpha isin() const
55  {
56  return fixedStr<12>(19);
57  }
58 
59  /// Defines the order-book types that are allowed for the instrument. Each designated bit represents a
60  /// book type.
63  {
64  return ordinary<BitField>(31);
65  }
66 
67  /// Venue from which market data is received for the instrument.
70  {
71  return enumeration<SourceVenue>(32);
72  }
73 
74  /// Instrument identifier used by the source venue.
77  {
78  return fixedStr<11>(34);
79  }
80 
81  /// The tick structure applicable for the instrument.
82  Alpha tickID() const
84  {
85  return fixedStr<2>(45);
86  }
87 
88  /// Price Band Tolerance (%) of the instrument.
91  {
92  return Price(ordinary<UInt64>(47));
93  }
94 
95  /// Dynamic Circuit Breaker Tolerance (%) of the instrument.
98  {
99  return Price(ordinary<UInt64>(55));
100  }
101 
102  /// Static Circuit Breaker Tolerance (%) of the instrument.
105  {
106  return Price(ordinary<UInt64>(63));
107  }
108 
109  /// Segment or instrument group ID as identified by the trading market.
110  Alpha groupID() const
112  {
113  return fixedStr<6>(71);
114  }
115 
116  /// Underlying ISIN code.
119  {
120  return fixedStr<12>(77);
121  }
122 
123  /// Venue specified instrument ID of the underlying.
126  {
127  return fixedStr<11>(89);
128  }
129 
130  /// Currency code as per ISO 4217.
131  Alpha currency() const
133  {
134  return fixedStr<3>(100);
135  }
136 
137  /// Reserved for future use.
140  {
141  return ordinaryRef<Byte>(103);
142  }
143 
144  /// Reserved for future use.
147  {
148  return fixedStr<4>(104);
149  }
150 
151  /// Average Daily Turnover as reported by the Source Venue. Applicable to TRADEcho only.
154  {
155  return Price4(ordinary<UInt64>(108));
156  }
157 
158  /// Reserved for future use.
161  {
162  return fixedStr<8>(116);
163  }
164 
165  /// Reserved for future use
166  BitField flags() const
168  {
169  return ordinary<BitField>(124);
170  }
171 
172  /// Reserved for future use.
175  {
176  return Price(ordinary<UInt64>(125));
177  }
178 
179  /// Reserved for future use.
182  {
183  return Price(ordinary<UInt64>(133));
184  }
185 
186  /// Total message size.
188 
189  /// Check the given size.
190  static void validateSize(MessageSize size)
191  {
192  if(size < messageSize_)
193  throwIncorrectSize("InstrumentDirectory", size, messageSize_);
194  }
195 
196  /// Initializes instance over given memory block.
197  InstrumentDirectoryMsg(const void* data, MessageSize size)
199  : BinaryMessage(data, size)
200  {
201  }
202  };
203 
204  /// Serializes object into string.
205  ONIXS_EUROTLX_GTP_API void toStr(std::string&, const InstrumentDirectoryMsg&);
206 
207  /// Serializes object into string.
208  inline std::string toStr(const InstrumentDirectoryMsg& msg)
209  {
210  std::string str;
211  toStr(str, msg);
212  return str;
213  }
214 
215 }
216 }
217 }
218 }
#define ONIXS_EUROTLX_GTP_CONST_OR_CONSTEXPR
Definition: Compiler.h:46
Price dynamicCircuitBreakerTolerances() const ONIXS_EUROTLX_GTP_NOTHROW
Dynamic Circuit Breaker Tolerance (%) of the instrument.
Price priceBandTolerances() const ONIXS_EUROTLX_GTP_NOTHROW
Price Band Tolerance (%) of the instrument.
BinaryMessage() ONIXS_EUROTLX_GTP_NOTHROW
Initializes blank instance referencing to nothing.
SourceVenue::Enum sourceVenue() const ONIXS_EUROTLX_GTP_NOTHROW
Venue from which market data is received for the instrument.
#define ONIXS_EUROTLX_GTP_NOTHROW
Definition: Compiler.h:27
UInt8 BitField
A single byte used to hold up to eight 1-bit flags. Each bit will represent a Boolean flag...
Definition: Defines.h:82
FixedPointDecimal< Int64, IntegralConstant< Int8,-4 > > Price4
Signed Little-Endian encoded 64bit integer field with four implied decimal places.
Definition: Defines.h:120
Alpha underlyingISINCode() const ONIXS_EUROTLX_GTP_NOTHROW
Underlying ISIN code.
Price reservedField5() const ONIXS_EUROTLX_GTP_NOTHROW
Reserved for future use.
FixedPointDecimal< Int64, IntegralConstant< Int8,-8 > > Price
Signed Little-Endian encoded 64bit integer field with eight implied decimal places.
Definition: Defines.h:102
UInt16 MessageSize
Aliases message length type.
Definition: Defines.h:141
ONIXS_EUROTLX_GTP_API void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
UInt64 instrument() const ONIXS_EUROTLX_GTP_NOTHROW
GTP Instrument identifier.
Byte reservedField1() const ONIXS_EUROTLX_GTP_NOTHROW
Reserved for future use.
Alpha venueInstrumentID() const ONIXS_EUROTLX_GTP_NOTHROW
Instrument identifier used by the source venue.
BitField flags() const ONIXS_EUROTLX_GTP_NOTHROW
Reserved for future use.
Alpha isin() const ONIXS_EUROTLX_GTP_NOTHROW
ISIN code of the instrument.
Alpha reservedField2() const ONIXS_EUROTLX_GTP_NOTHROW
Reserved for future use.
Alpha reservedField3() const ONIXS_EUROTLX_GTP_NOTHROW
Reserved for future use.
Alpha currency() const ONIXS_EUROTLX_GTP_NOTHROW
Currency code as per ISO 4217.
UDT timestamp() const ONIXS_EUROTLX_GTP_NOTHROW
Time the message was generated.
BitField allowedBookTypes() const ONIXS_EUROTLX_GTP_NOTHROW
Price4 averageDailyTurnover() const ONIXS_EUROTLX_GTP_NOTHROW
Average Daily Turnover as reported by the Source Venue. Applicable to TRADEcho only.
Alpha tickID() const ONIXS_EUROTLX_GTP_NOTHROW
The tick structure applicable for the instrument.
Price reservedField4() const ONIXS_EUROTLX_GTP_NOTHROW
Reserved for future use.
Encapsulates services for manipulating little endian encoded messages.
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
static ONIXS_EUROTLX_GTP_CONST_OR_CONSTEXPR MessageSize messageSize_
Total message size.
UInt8 Byte
Alias for Byte.
Definition: Memory.h:37
static void validateSize(MessageSize size)
Check the given size.
Alpha groupID() const ONIXS_EUROTLX_GTP_NOTHROW
Segment or instrument group ID as identified by the trading market.
Alpha underlyingInstrumentID() const ONIXS_EUROTLX_GTP_NOTHROW
Venue specified instrument ID of the underlying.
InstrumentDirectoryMsg(const void *data, MessageSize size) ONIXS_EUROTLX_GTP_NOTHROW
Initializes instance over given memory block.
Price staticCircuitBreakerTolerances() const ONIXS_EUROTLX_GTP_NOTHROW
Static Circuit Breaker Tolerance (%) of the instrument.
ONIXS_EUROTLX_GTP_API void toStr(std::string &, EventCode::Enum)
Appends string presentation of object.