OnixS C++ eSpeed ITCH Market Data Handler  1.7.3
API documentation
CombinationOrderBookDirectoryMsg.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 
24 
26 
27  /// The Combination Order Book Directory is a
28  /// specialized directory message used when Combined
29  /// order books are traded on the NFI ATS.
30  struct ONIXS_ESPEED_ITCH_API CombinationOrderBookDirectoryMsg : public IncomingMessage
31  {
32  /// Timestamp
33  UInt64 timestamp() const
34  {
35  return ordinary<UInt64>(1);
36  }
37 
38  /// Unique identifier of an Order book. This
39  /// identifier will stay constant until this
41  {
42  return ordinary<UInt32>(9);
43  }
44 
45  /// UST security symbol in the NFI ATS (e.g. 10Y_UST)
46  StrRef symbol() const
48  {
49  return fixedStr<20>(13);
50  }
51 
52  /// Instrument Description
55  {
56  return fixedStr<16>(33);
57  }
58 
59  /// CUSIP code identifying security
60  StrRef cusip() const
62  {
63  return fixedStr<9>(49);
64  }
65 
66  /// Reserved
67  UInt8 reserved1() const
68  {
69  return ordinaryRef<UInt8>(58);
70  }
71 
72  /// Product type
75  {
76  return enumeration<ProductType>(59);
77  }
78 
79  /// Price type
82  {
83  return enumeration<PriceType>(60);
84  }
85 
86  /// The number of decimals used in price or yield for
87  /// this order book in NFI ATS.
88  UInt16 priceDecimals() const
89  {
90  return ordinary<UInt16>(61);
91  }
92 
93  /// For securities that do not trade in Yield but will
94  /// have yield published, this field describes number
95  /// of decimals for yield field.
96  UInt16 yieldDecimals() const
97  {
98  return ordinary<UInt16>(63);
99  }
100 
101  /// 1000000 million is the value published for US
102  /// Treasury Notes.
103  UInt32 quantityMultiplier() const
104  {
105  return ordinary<UInt32>(65);
106  }
107 
108  /// Reserved
111  {
112  return fixedStr<18>(69);
113  }
114 
115  /// Indicates how many legs of a combination
116  /// instrument has
117  UInt8 numberOfLegs() const
118  {
119  return ordinaryRef<UInt8>(87);
120  }
121 
122  /// Leg 1 Symbol
125  {
126  return fixedStr<20>(88);
127  }
128 
129  /// Leg 1 Side
132  {
133  return enumeration<LegSide>(108);
134  }
135 
136  /// DV01 value of leg 1
137  UInt16 leg1DV01() const
138  {
139  return ordinary<UInt16>(109);
140  }
141 
142  ///
143  UInt8 leg1Reserved() const
144  {
145  return ordinaryRef<UInt8>(111);
146  }
147 
148  /// Leg 2 Symbol
151  {
152  return fixedStr<20>(112);
153  }
154 
155  /// Leg 2 Side
158  {
159  return enumeration<LegSide>(132);
160  }
161 
162  /// DV01 value of leg 2
163  UInt16 leg2DV01() const
164  {
165  return ordinary<UInt16>(133);
166  }
167 
168  ///
169  UInt8 leg2Reserved() const
170  {
171  return ordinaryRef<UInt8>(135);
172  }
173 
174  /// Leg ratio used for implied trading derived from
175  /// DV01 values
176  UInt16 legRatio1() const
177  {
178  return ordinary<UInt16>(136);
179  }
180 
181  /// Leg 3 Symbol
184  {
185  return fixedStr<20>(138);
186  }
187 
188  /// Leg 3 Side
191  {
192  return enumeration<LegSide>(158);
193  }
194 
195  /// DV01 value of leg 3
196  UInt16 leg3DV01() const
197  {
198  return ordinary<UInt16>(159);
199  }
200 
201  ///
202  UInt8 leg3Reserved() const
203  {
204  return ordinaryRef<UInt8>(161);
205  }
206 
207  /// The ratio used for implied trading that is applied
208  /// for 3 leg combination instrument
209  UInt16 legRatio2() const
210  {
211  return ordinary<UInt16>(162);
212  }
213 
214  /// The maximum spread defined for the short duration
215  /// leg
216  UInt16 maximumSpreadTolerance1() const
217  {
218  return ordinary<UInt16>(164);
219  }
220 
221  /// The maximum spread defined for the middle duration
222  /// leg
223  UInt16 maximumSpreadTolerance2() const
224  {
225  return ordinary<UInt16>(166);
226  }
227 
228  /// Trading Features
231  {
232  return static_cast<TradingFeatures::Enum>(ordinary<TradingFeatures::Base>(168));
233  }
234 
235  /// The minimum visible quantity of the order allowed
236  /// to be added to the book.
237  UInt32 minimumEntryQuantity() const
238  {
239  return ordinary<UInt32>(170);
240  }
241 
242  /// The minimum increment for visible quantity of the
243  /// order.
245  {
246  return ordinary<UInt32>(174);
247  }
248 
249  /// The price tick for the instrument
250  UInt64 priceTickSize() const
251  {
252  return ordinary<UInt64>(178);
253  }
254 
255  /// Reserved
258  {
259  return fixedStr<14>(186);
260  }
261 
262  /// Total message size.
264 
265  /// Check the given size.
266  static void validateSize(MessageSize size)
267  {
268  if (ONIXS_ESPEED_ITCH_CHECK_EXPECT((size < messageSize_), false))
269  throwIncorrectSize("CombinationOrderBookDirectoryMsg", size, messageSize_);
270  }
271 
272  /// Initializes instance over given memory block.
275  : IncomingMessage(data, size)
276  {
277  }
278  };
279 
280  /// Serializes object into string.
281  ONIXS_ESPEED_ITCH_API void toStr(std::string&, const CombinationOrderBookDirectoryMsg&);
282 
283  /// Serializes object into string.
284  inline std::string toStr(const CombinationOrderBookDirectoryMsg& msg)
285  {
286  std::string str;
287  toStr(str, msg);
288  return str;
289  }
290 
291  ///
292  inline std::ostream& operator<<(std::ostream& stream, const CombinationOrderBookDirectoryMsg& msg)
293  {
294  stream << toStr(msg);
295  return stream;
296  }
297 
#define ONIXS_ESPEED_ITCH_NAMESPACE_END
Definition: Bootstrap.h:31
#define ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN
Definition: Bootstrap.h:27
UInt16 leg1DV01() const
DV01 value of leg 1.
ONIXS_ESPEED_ITCH_API void toStr(std::string &, const CombinationOrderBookDirectoryMsg &)
Serializes object into string.
ONIXS_ESPEED_ITCH_API void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
StrRef symbol() const ONIXS_ESPEED_ITCH_NOTHROW
UST security symbol in the NFI ATS (e.g. 10Y_UST)
TradingFeatures::Enum tradingFeatures() const ONIXS_ESPEED_ITCH_NOTHROW
Trading Features.
static void validateSize(MessageSize size)
Check the given size.
#define ONIXS_ESPEED_ITCH_CHECK_EXPECT(exp, c)
Definition: Compiler.h:52
StrRef leg3Symbol() const ONIXS_ESPEED_ITCH_NOTHROW
Leg 3 Symbol.
StrRef leg2Symbol() const ONIXS_ESPEED_ITCH_NOTHROW
Leg 2 Symbol.
UInt16 leg3DV01() const
DV01 value of leg 3.
UInt16 leg2DV01() const
DV01 value of leg 2.
ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN typedef UInt16 MessageSize
Aliases message length type.
Definition: Defines.h:34
LegSide::Enum leg1Side() const ONIXS_ESPEED_ITCH_NOTHROW
Leg 1 Side.
ProductType::Enum productType() const ONIXS_ESPEED_ITCH_NOTHROW
Product type.
StrRef cusip() const ONIXS_ESPEED_ITCH_NOTHROW
CUSIP code identifying security.
LegSide::Enum leg2Side() const ONIXS_ESPEED_ITCH_NOTHROW
Leg 2 Side.
StrRef reserved3() const ONIXS_ESPEED_ITCH_NOTHROW
Reserved.
StrRef leg1Symbol() const ONIXS_ESPEED_ITCH_NOTHROW
Leg 1 Symbol.
PriceType::Enum priceType() const ONIXS_ESPEED_ITCH_NOTHROW
Price type.
StrRef securityDescription() const ONIXS_ESPEED_ITCH_NOTHROW
Instrument Description.
std::ostream & operator<<(std::ostream &stream, const CombinationOrderBookDirectoryMsg &msg)
#define ONIXS_ESPEED_ITCH_CONST_OR_CONSTEXPR
Definition: Compiler.h:46
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:40
CombinationOrderBookDirectoryMsg(const void *data, MessageSize size) ONIXS_ESPEED_ITCH_NOTHROW
Initializes instance over given memory block.
LegSide::Enum leg3Side() const ONIXS_ESPEED_ITCH_NOTHROW
Leg 3 Side.
#define ONIXS_ESPEED_ITCH_NOTHROW
Definition: Compiler.h:27
IncomingMessage(const void *data, MessageSize size) ONIXS_ESPEED_ITCH_NOTHROW
StrRef reserved2() const ONIXS_ESPEED_ITCH_NOTHROW
Reserved.
UInt32 OrderBookId
Alias for Security Id type.
Definition: Defines.h:43
UInt64 priceTickSize() const
The price tick for the instrument.