OnixS C++ Fenics UST BIMP Market Data Handler  1.1.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 FenicsUST {
32 namespace MarketData {
33 namespace Bimp {
34 
35  /// Instrument Directory
37  {
38  /// Instrument locate code assigned to the security for the day.
41  {
42  return ordinary<Integer4>(1);
43  }
44 
45  /// Timestamp for this message. Expressed as the number of nanoseconds since Unix Epoch (00:00:00 UTC on
46  /// 1 January 1970).
49  {
50  return ordinary<Integer8>(5);
51  }
52 
53  /// The unique numeric instrument identification number, used as the primary identifier for order
54  /// management via the BOP protocol.
57  {
58  return ordinary<Integer8>(13);
59  }
60 
61  /// Legacy Instrument Symbol. Deprecated but provided for backward compatibility.
64  {
65  return fixedStr<20>(21);
66  }
67 
68  /// Instrument Symbol Suffix
71  {
72  return fixedStr<10>(41);
73  }
74 
75  /// Instrument description
78  {
79  return fixedStr<30>(51);
80  }
81 
82  /// Instrument CUSIP / ISIN if applicable.
85  {
86  return fixedStr<12>(81);
87  }
88 
89  /// Type of the content of the Industry Identifier
92  {
93  return enumeration<IndustryIdentifierType>(93);
94  }
95 
96  /// Instrument Type
99  {
100  return enumeration<InstrumentType>(94);
101  }
102 
103  /// Instrument Sub Type
106  {
107  return fixedStr<2>(95);
108  }
109 
110  /// ISO currency code.
111  StrRef currency() const
113  {
114  return fixedStr<3>(97);
115  }
116 
117  /// The minimum quantity than can be used on an order. For Block Book instruments, this is applicable to
118  /// aggressive orders.
121  {
122  return ordinary<Integer8>(100);
123  }
124 
125  /// The maximum quantity that can be used on an order. Applicable to Block Book instruments only.
128  {
129  return ordinary<Integer8>(108);
130  }
131 
132  /// Incremental order size.
135  {
136  return ordinary<Integer8>(116);
137  }
138 
139  /// Price Type
142  {
143  return enumeration<PriceType>(124);
144  }
145 
146  /// The minimum decimal price increment scaled as per a price field.
149  {
150  return ordinary<Integer8>(126);
151  }
152 
153  /// The minimum fractional price increment, expressed as a decimal and scaled as per a price field.
156  {
157  return ordinary<Integer8>(134);
158  }
159 
160  /// Match Algorithm
163  {
164  return enumeration<MatchAlgorithm>(142);
165  }
166 
167  /// The instrument locate code for the first leg of a multi-leg instrument.
170  {
171  return ordinary<Integer4>(143);
172  }
173 
174  /// Leg One Side
177  {
178  return enumeration<Side>(147);
179  }
180 
181  /// The instrument locate code for the first leg of a multi-leg instrument.
184  {
185  return ordinary<Integer4>(148);
186  }
187 
188  /// Leg Two Side
191  {
192  return enumeration<Side>(152);
193  }
194 
195  /// The instrument locate code for the third leg of a multi-leg instrument.
198  {
199  return ordinary<Integer4>(153);
200  }
201 
202  /// Leg Three Side
205  {
206  return enumeration<Side>(157);
207  }
208 
209  /// Authenticity
212  {
213  return enumeration<Authenticity>(158);
214  }
215 
216  /// Instrument Symbol (supersedes the Legacy Symbol above)
219  {
220  return fixedStr<30>(159);
221  }
222 
223  /// Issue Date (YYYYMMDD)
226  {
227  return fixedStr<8>(189);
228  }
229 
230  /// Maturity Date (YYYYMMDD)
233  {
234  return fixedStr<8>(197);
235  }
236 
237  /// Settlement Date (YYYYMMDD)
240  {
241  return fixedStr<8>(205);
242  }
243 
244  /// Accrual Date (YYYYMMDD)
247  {
248  return fixedStr<8>(213);
249  }
250 
251  /// Block tier identifier in increasing order sizes.
254  {
255  return enumeration<BlockTierId>(221);
256  }
257 
258  /// The coupon rate scaled as per a price field.
261  {
262  return ordinary<Integer8>(222);
263  }
264 
265  /// Market Identifier Code (MIC) (ISO 10383).
266  StrRef mIC() const
268  {
269  return fixedStr<4>(230);
270  }
271 
272  /// CFI code
273  StrRef cFIcode() const
275  {
276  return fixedStr<6>(234);
277  }
278 
279  /// Illiquid Instrument
282  {
283  return enumeration<YesOrNo>(240);
284  }
285 
286  /// MIFID II Large-in-Scale (LIS) threshold for pre-trade transparency
289  {
290  return ordinary<Integer8>(241);
291  }
292 
293  /// Future use.
296  {
297  return ordinary<Integer8>(249);
298  }
299 
300  /// The amount that price related fields are scaled to allow them to be expressed as integers.
303  {
304  return ordinary<Integer8>(257);
305  }
306 
307  /// The ratio of quantity for the leg two instrument relative to the entire multileg security.
310  {
311  return ordinary<Integer8>(265);
312  }
313 
314  /// The ratio of quantity for the leg one instrument relative to the entire multileg security.
317  {
318  return ordinary<Integer8>(273);
319  }
320 
321  /// Clients who are permitted to submit directed orders are limited in the quantity they can direct.
324  {
325  return ordinary<Integer8>(281);
326  }
327 
328  /// The minimum quantity that can be used on an Iceberg order.
331  {
332  if (binarySize() < 289 + sizeof(Integer8))
333  return false;
334 
335  value = ordinary<Integer8>(289);
336  return true;
337  }
338 
339  /// Trade Date (YYYYMMDD)
340  bool tradeDate(Integer4& value) const
342  {
343  if (binarySize() < 297 + sizeof(Integer4))
344  return false;
345 
346  value = ordinary<Integer4>(297);
347  return true;
348  }
349 
350  /// Total message size.
352 
353  /// Min message size.
355 
356  /// Check the given size.
357  static void validateSize(MessageSize size)
358  {
359  if (ONIXS_FENICSUST_BIMP_CHECK_EXPECT((size < minMessageSize_), false))
360  throwIncorrectSize("InstrumentDirectory", size, minMessageSize_);
361  }
362 
363  /// Initializes instance over given memory block.
364  InstrumentDirectoryMsg(const void* data, MessageSize size)
366  : BinaryMessage(data, size)
367  {
368  }
369  };
370 
371  /// Serializes object into string.
372  ONIXS_FENICSUST_BIMP_API void toStr(std::string&, const InstrumentDirectoryMsg&);
373 
374  /// Serializes object into string.
375  inline std::string toStr(const InstrumentDirectoryMsg& msg)
376  {
377  std::string str;
378  toStr(str, msg);
379  return str;
380  }
381 
382 }
383 }
384 }
385 }
MatchAlgorithm::Enum matchAlgorithm() const ONIXS_FENICSUST_BIMP_NOTHROW
Match Algorithm.
Integer8 maximumOrderSize() const ONIXS_FENICSUST_BIMP_NOTHROW
The maximum quantity that can be used on an order. Applicable to Block Book instruments only...
Integer8 fractionalPriceTick() const ONIXS_FENICSUST_BIMP_NOTHROW
The minimum fractional price increment, expressed as a decimal and scaled as per a price field...
static ONIXS_FENICSUST_BIMP_CONST_OR_CONSTEXPR MessageSize messageSize_
Total message size.
Integer8 priceMultiplier() const ONIXS_FENICSUST_BIMP_NOTHROW
The amount that price related fields are scaled to allow them to be expressed as integers.
Integer8 couponRate() const ONIXS_FENICSUST_BIMP_NOTHROW
The coupon rate scaled as per a price field.
Integer8 legTwoRatioQty() const ONIXS_FENICSUST_BIMP_NOTHROW
The ratio of quantity for the leg two instrument relative to the entire multileg security.
Integer8 sizeThresholdSSTI() const ONIXS_FENICSUST_BIMP_NOTHROW
Future use.
StrRef maturityDate() const ONIXS_FENICSUST_BIMP_NOTHROW
Maturity Date (YYYYMMDD)
ONIXS_FENICSUST_BIMP_API ONIXS_FENICSUST_BIMP_COLD_PATH ONIXS_FENICSUST_BIMP_NORETURN void throwIncorrectSize(const std::string &messageName, MessageSize receivedSize, MessageSize expectedSize)
BlockTierId::Enum blockTierId() const ONIXS_FENICSUST_BIMP_NOTHROW
Block tier identifier in increasing order sizes.
IndustryIdentifierType::Enum industryIdentifierType() const ONIXS_FENICSUST_BIMP_NOTHROW
Type of the content of the Industry Identifier.
Side::Enum legTwoSide() const ONIXS_FENICSUST_BIMP_NOTHROW
Leg Two Side.
static void validateSize(MessageSize size)
Check the given size.
PriceType::Enum priceType() const ONIXS_FENICSUST_BIMP_NOTHROW
Price Type.
Integer8 roundLotSize() const ONIXS_FENICSUST_BIMP_NOTHROW
Incremental order size.
Integer8 maximumDirectedStreamingMultiplier() const ONIXS_FENICSUST_BIMP_NOTHROW
Clients who are permitted to submit directed orders are limited in the quantity they can direct...
BinaryMessage() ONIXS_FENICSUST_BIMP_NOTHROW
Initializes blank instance referencing to nothing.
YesOrNo::Enum illiquidInstrument() const ONIXS_FENICSUST_BIMP_NOTHROW
Illiquid Instrument.
StrRef issueDate() const ONIXS_FENICSUST_BIMP_NOTHROW
Issue Date (YYYYMMDD)
#define ONIXS_FENICSUST_BIMP_CHECK_EXPECT(exp, c)
Definition: Compiler.h:52
bool minimumIcebergOrderSize(Integer8 &value) const ONIXS_FENICSUST_BIMP_NOTHROW
The minimum quantity that can be used on an Iceberg order.
StrRef interestAccrualDate() const ONIXS_FENICSUST_BIMP_NOTHROW
Accrual Date (YYYYMMDD)
StrRef cFIcode() const ONIXS_FENICSUST_BIMP_NOTHROW
CFI code.
Provides efficient way of accessing text-based FIX field values.
Definition: String.h:45
#define ONIXS_FENICSUST_BIMP_CONST_OR_CONSTEXPR
Definition: Compiler.h:46
Integer8 legOneRatioQty() const ONIXS_FENICSUST_BIMP_NOTHROW
The ratio of quantity for the leg one instrument relative to the entire multileg security.
bool tradeDate(Integer4 &value) const ONIXS_FENICSUST_BIMP_NOTHROW
Trade Date (YYYYMMDD)
MessageSize binarySize() const ONIXS_FENICSUST_BIMP_NOTHROW
Size of message.
Integer4 legTwoInstrumentLocate() const ONIXS_FENICSUST_BIMP_NOTHROW
The instrument locate code for the first leg of a multi-leg instrument.
Integer8 decimalPriceTick() const ONIXS_FENICSUST_BIMP_NOTHROW
The minimum decimal price increment scaled as per a price field.
Side::Enum legThreeSide() const ONIXS_FENICSUST_BIMP_NOTHROW
Leg Three Side.
InstrumentDirectoryMsg(const void *data, MessageSize size) ONIXS_FENICSUST_BIMP_NOTHROW
Initializes instance over given memory block.
#define ONIXS_FENICSUST_BIMP_NOTHROW
Definition: Compiler.h:27
Integer8 minimumOrderSize() const ONIXS_FENICSUST_BIMP_NOTHROW
Encapsulates services for manipulating little endian encoded messages.
ONIXS_FENICSUST_BIMP_API void toStr(std::string &, EventCode::Enum)
Appends string presentation of object.
Integer4 legOneInstrumentLocate() const ONIXS_FENICSUST_BIMP_NOTHROW
The instrument locate code for the first leg of a multi-leg instrument.
StrRef settlementDate() const ONIXS_FENICSUST_BIMP_NOTHROW
Settlement Date (YYYYMMDD)
Integer8 instrumentId() const ONIXS_FENICSUST_BIMP_NOTHROW
Integer8 timestamp() const ONIXS_FENICSUST_BIMP_NOTHROW
Integer4 legThreeInstrumentLocate() const ONIXS_FENICSUST_BIMP_NOTHROW
The instrument locate code for the third leg of a multi-leg instrument.
StrRef legacySymbol() const ONIXS_FENICSUST_BIMP_NOTHROW
Legacy Instrument Symbol. Deprecated but provided for backward compatibility.
StrRef enhancedSymbol() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument Symbol (supersedes the Legacy Symbol above)
StrRef mIC() const ONIXS_FENICSUST_BIMP_NOTHROW
Market Identifier Code (MIC) (ISO 10383).
Integer2 MessageSize
Aliases message length type.
Definition: Defines.h:100
InstrumentType::Enum instrumentType() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument Type.
Integer8 thresholdLIS() const ONIXS_FENICSUST_BIMP_NOTHROW
MIFID II Large-in-Scale (LIS) threshold for pre-trade transparency.
StrRef description() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument description.
Authenticity::Enum authenticity() const ONIXS_FENICSUST_BIMP_NOTHROW
Authenticity.
StrRef industryIdentifier() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument CUSIP / ISIN if applicable.
StrRef symbolSuffix() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument Symbol Suffix.
StrRef instrumentSubType() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument Sub Type.
Side::Enum legOneSide() const ONIXS_FENICSUST_BIMP_NOTHROW
Leg One Side.
static ONIXS_FENICSUST_BIMP_CONST_OR_CONSTEXPR MessageSize minMessageSize_
Min message size.
Integer4 instrumentLocate() const ONIXS_FENICSUST_BIMP_NOTHROW
Instrument locate code assigned to the security for the day.
StrRef currency() const ONIXS_FENICSUST_BIMP_NOTHROW
ISO currency code.