OnixS C++ eSpeed ITCH Market Data Handler  1.7.3
API documentation
OrderBookDirectoryMsg.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  /// At the start of each trading day, order book
28  /// directory messages are sent for all active US
29  /// Treasury securities in the ATS.
30  struct ONIXS_ESPEED_ITCH_API OrderBookDirectoryMsg : 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  /// Product Subtype
82  {
83  return enumeration<ProductSubType>(60);
84  }
85 
86  /// Price type
89  {
90  return enumeration<PriceType>(61);
91  }
92 
93  /// The number of decimals used in price or yield for
94  /// this order book in NFI ATS.
95  UInt16 priceDecimals() const
96  {
97  return ordinary<UInt16>(62);
98  }
99 
100  /// For securities that do not trade in Yield but will
101  /// have yield published, this field describes number
102  /// of decimals for yield field.
103  UInt16 yieldDecimals() const
104  {
105  return ordinary<UInt16>(64);
106  }
107 
108  /// The number of decimals used in the Coupon field.
109  /// If Coupon is not used, this field will be set to
110  /// -1.
111  UInt16 couponDecimals() const
112  {
113  return ordinary<UInt16>(66);
114  }
115 
116  /// 1000000 million is the value published for US
117  /// Treasury Notes.
118  UInt32 quantityMultiplier() const
119  {
120  return ordinary<UInt32>(68);
121  }
122 
123  ///
124  UInt16 reserved2() const
125  {
126  return ordinary<UInt16>(72);
127  }
128 
129  /// Maturity date
130  UInt32 maturity() const
131  {
132  return ordinary<UInt32>(74);
133  }
134 
135  /// Coupon Rate
136  UInt32 coupon() const
137  {
138  return ordinary<UInt32>(78);
139  }
140 
141  /// Dated Date
142  UInt32 datedDate() const
143  {
144  return ordinary<UInt32>(82);
145  }
146 
147  /// Issue Date
148  UInt32 issueDate() const
149  {
150  return ordinary<UInt32>(86);
151  }
152 
153  /// Auction Date
154  UInt32 auctionDate() const
155  {
156  return ordinary<UInt32>(90);
157  }
158 
159  /// Announcement Date
160  UInt32 announcementDate() const
161  {
162  return ordinary<UInt32>(94);
163  }
164 
165  /// First Coupon Date
166  UInt32 firstCouponDate() const
167  {
168  return ordinary<UInt32>(98);
169  }
170 
171  /// Settlement Date
172  UInt32 settlementDate() const
173  {
174  return ordinary<UInt32>(102);
175  }
176 
177  /// Index Reference Rate
178  UInt32 index() const
179  {
180  return ordinary<UInt32>(106);
181  }
182 
183  /// Spread Rate
184  UInt32 spreadRate() const
185  {
186  return ordinary<UInt32>(110);
187  }
188 
189  /// Trading Features
192  {
193  return static_cast<TradingFeatures::Enum>(ordinary<TradingFeatures::Base>(114));
194  }
195 
196  /// The minimum visible quantity of the order allowed
197  /// to be added to the book.
199  {
200  return ordinary<UInt32>(116);
201  }
202 
203  /// The minimum increment for visible quantity of the
204  /// order.
206  {
207  return ordinary<UInt32>(120);
208  }
209 
210  /// Issued as Benchmark
213  {
214  return static_cast<IssuedAsBenchmark::Enum>(ordinary<IssuedAsBenchmark::Base>(124));
215  }
216 
217  /// The price tick for the instrument
218  UInt64 priceTickSize() const
219  {
220  return ordinary<UInt64>(126);
221  }
222 
223  /// Reserved
226  {
227  return fixedStr<12>(134);
228  }
229 
230  /// Total message size.
232 
233  /// Check the given size.
234  static void validateSize(MessageSize size)
235  {
236  if (ONIXS_ESPEED_ITCH_CHECK_EXPECT((size < messageSize_), false))
237  throwIncorrectSize("OrderBookDirectoryMsg", size, messageSize_);
238  }
239 
240  /// Initializes instance over given memory block.
241  OrderBookDirectoryMsg(const void* data, MessageSize size)
243  : IncomingMessage(data, size)
244  {
245  }
246  };
247 
248  /// Serializes object into string.
249  ONIXS_ESPEED_ITCH_API void toStr(std::string&, const OrderBookDirectoryMsg&);
250 
251  /// Serializes object into string.
252  inline std::string toStr(const OrderBookDirectoryMsg& msg)
253  {
254  std::string str;
255  toStr(str, msg);
256  return str;
257  }
258 
259  ///
260  inline std::ostream& operator<<(std::ostream& stream, const OrderBookDirectoryMsg& msg)
261  {
262  stream << toStr(msg);
263  return stream;
264  }
265 
#define ONIXS_ESPEED_ITCH_NAMESPACE_END
Definition: Bootstrap.h:31
#define ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN
Definition: Bootstrap.h:27
ONIXS_ESPEED_ITCH_API void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
std::ostream & operator<<(std::ostream &stream, const OrderBookDirectoryMsg &msg)
UInt32 firstCouponDate() const
First Coupon Date.
UInt32 issueDate() const
Issue Date.
StrRef cusip() const ONIXS_ESPEED_ITCH_NOTHROW
CUSIP code identifying security.
UInt32 minimumQuantityIncrement() const
UInt32 settlementDate() const
Settlement Date.
OrderBookId orderBookId() const
#define ONIXS_ESPEED_ITCH_CHECK_EXPECT(exp, c)
Definition: Compiler.h:52
UInt32 Quantity
Alias for Quantity type.
Definition: Defines.h:46
OrderBookDirectoryMsg(const void *data, MessageSize size) ONIXS_ESPEED_ITCH_NOTHROW
Initializes instance over given memory block.
UInt64 timestamp() const
Timestamp.
StrRef reserved3() const ONIXS_ESPEED_ITCH_NOTHROW
Reserved.
IssuedAsBenchmark::Enum issuedAsBenchmark() const ONIXS_ESPEED_ITCH_NOTHROW
Issued as Benchmark.
Quantity minimumEntryQuantity() const
ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN typedef UInt16 MessageSize
Aliases message length type.
Definition: Defines.h:34
StrRef securityDescription() const ONIXS_ESPEED_ITCH_NOTHROW
Instrument Description.
TradingFeatures::Enum tradingFeatures() const ONIXS_ESPEED_ITCH_NOTHROW
Trading Features.
UInt32 datedDate() const
Dated Date.
ONIXS_ESPEED_ITCH_API void toStr(std::string &, const OrderBookDirectoryMsg &)
Serializes object into string.
UInt32 announcementDate() const
Announcement Date.
StrRef symbol() const ONIXS_ESPEED_ITCH_NOTHROW
UST security symbol in the NFI ATS (e.g. 10Y_UST)
UInt32 index() const
Index Reference Rate.
#define ONIXS_ESPEED_ITCH_CONST_OR_CONSTEXPR
Definition: Compiler.h:46
ProductType::Enum productType() const ONIXS_ESPEED_ITCH_NOTHROW
Product type.
PriceType::Enum priceType() const ONIXS_ESPEED_ITCH_NOTHROW
Price type.
UInt32 maturity() const
Maturity date.
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:40
UInt32 coupon() const
Coupon Rate.
UInt32 spreadRate() const
Spread Rate.
#define ONIXS_ESPEED_ITCH_NOTHROW
Definition: Compiler.h:27
static void validateSize(MessageSize size)
Check the given size.
IncomingMessage(const void *data, MessageSize size) ONIXS_ESPEED_ITCH_NOTHROW
ProductSubType::Enum productSubType() const ONIXS_ESPEED_ITCH_NOTHROW
Product Subtype.
UInt8 reserved1() const
Reserved.
UInt64 priceTickSize() const
The price tick for the instrument.
UInt32 quantityMultiplier() const
UInt32 auctionDate() const
Auction Date.
UInt32 OrderBookId
Alias for Security Id type.
Definition: Defines.h:43