OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.15.1
API documentation
OptionsProductDefinition.h
Go to the documentation of this file.
1 /**
2  * \file
3  * \brief Declare `OnixS::ICE::iMpact::MarketData::OptionsProductDefinition` message structure
4  */
5 /*
6  * Copyright (c) Onix Solutions Limited. All rights reserved.
7  *
8  * This software owned by Onix Solutions Limited and is protected by copyright law
9  * and international copyright treaties.
10  *
11  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
12  * Services Agreement (the Agreement) and Customer end user license agreements granting
13  * a non-assignable, non-transferable and non-exclusive license to use the software
14  * for it's own data processing purposes under the terms defined in the Agreement.
15  *
16  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
17  * of this source code or associated reference material to any other location for further reproduction
18  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
19  *
20  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
21  * the terms of the Agreement is a violation of copyright law.
22  */
23 
24 #pragma once
25 
26 #include "../Export.h"
27 #include "../Types.h"
28 #include "../Enumerations.h"
29 #include "../Optional.h"
30 
31 #include <iosfwd>
32 #include <string>
33 #include <vector>
34 
35 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
36 
37 /// This class represents the Options Product Definition Message.
38 struct ONIXS_ICEMDH_EXPORT OptionsProductDefinition
39 {
40  /// Message type constant
41  enum { messageType = 'p' };
42 
43  /// The original request sequence ID assigned by client, unique per
44  /// session.
46 
47  /// See Appendix C for the list of market types and IDs.
49 
50  /// Unique identifier of the option market.
52 
53  /// Underlying Futures/OTC market id. This market id links to the product
54  /// definition of the futures market.
56 
57  /// See Naming Convention on Appendix D.
58  std::string contractSymbol;
59 
60  /// See Appendix A on trading status codes.
62 
63  /// Denominator for the order price fields in this market.
65 
66  /// Minimum increment quantity for this market.
68 
69  /// The lot size is minimum size of contracts in lots. It is multiplier to
70  /// determine the total lots.
71  int lotSize;
72 
73  /// Description of the market.
74  std::string marketDesc;
75 
76  /// Option type.
78 
79  /// Strike Price of the option. Used in conjunction with the
80  /// NumDecimalsStrikePrice. This is often different from the premium price
81  /// decimals.
83 
84  /// Denominator for the deal price fields in the market. For most markets,
85  /// this is the same as OrderPriceDenominator.
87 
88  /// Minimum quantity for this market.
89  int minQty;
90 
91  /// The currency that the market is traded on.
92  std::string currency;
93 
94  /// Denominator for the strike price field.
96 
97  /// Minimum premium price for the option.
99 
100  /// Maximum premium price for the option.
102 
103  /// Price increment for the option market.
105 
106  /// 4 digit year.
108 
109  /// Month range 1-12.
111 
112  /// Day of the month.
114 
115  /// Options style.
117 
118  /// Options expiration type.
120 
121  /// The number of options markets for the given market type.
123 
124  /// The underlying futures market ID for a serial option. The serial
125  /// option market may or may not be a valid futures month and option will
126  /// expire/exercise into a position held in this underlying market. It
127  /// will be set to `-1` when not applicable.
129 
130  /// Extra contract symbol. Some contract symbols might contain more than
131  /// 35 characters. Clients should append this field to ContractSymbol
132  /// (Offset 19) to get the complete contract symbol.
133  std::string contractSymbolExtra;
134 
135  /// Denominator for the settlement price fields in the market. For most
136  /// markets, this is the same as DealPriceDenominator.
138 
139  /// Denominator for UnitQuantity. This field will be `0` for most of the
140  /// markets.
142 
143  /// Use `ScreentickValue` and BlockTickValue instead of this field.
144  /// `OrderPriceDenominator` should be applied to get the real value.
145  long long oldTickValue;
146 
147  /// Indicates if flexible strikes can be created for the option market.
149 
150  /// Settlement type.
152 
153  /// Indicates if Market is only tradable via ICE Block Trade. This also
154  /// means the screen trading is not allowed for the market.
156 
157  /// Indicates if GTC is allowed in the market.
158  bool gtAllowed;
159 
160  /// Indicates if Cross order is supported in the market.
162 
163  /// Indicates if Guarantee Cross is supported in the market.
165 
166  /// Unit Of Measure.
167  std::string unitOfMeasure;
168 
169  /// Indicates MIFID-II market.
171 
172  /// Indicates Test Market.
174 
175  /// This ISIN is only supported for MiFID Regulated Markets. Of the MiFID
176  /// markets, only Futures and Options markets will support ISINs; some
177  /// strategies will have an ISIN.
178  std::string isin;
179 
180  /// Screen last trade year, 4 digits.
182 
183  /// Screen last trade month, range 1-12.
185 
186  /// Screen last trade day of the month.
188 
189  /// Indicates if the contract is tradable.
191 
192  /// This nested class represents block details definition.
193  struct ONIXS_ICEMDH_EXPORT BlockDetail
194  {
195  /// Block Type.
197 
198  /// Trade Type.
200 
201  /// Minimum Quantity. `OffExchangeIncrementQtyDenominator` should be
202  /// applied to this field.
203  long long minQty;
204 
205  /// Default constructor.
206  BlockDetail();
207 
208  /// Returns string representation.
209  std::string toString() const;
210  };
211 
212  /// Alias for collection of BlockDetails.
213  typedef std::vector<BlockDetail> BlockDetails;
214 
215  /// Collection of BlockDetails.
216  BlockDetails blockDetails;
217 
218  /// Indicates whether the Block Minimum can be overridden for the market.
220 
221  /// The deliverable quantity of a stock, commodity, or other financial
222  /// instrument that underlies a futures or options contract.
224 
225  /// Identifies the monetary amount per tick move when calculated from the
226  /// Central Limit Order Book.
228 
229  /// Identifies the monetary amount per tick move when calculated for Off-
230  /// Exchange trades.
232 
233  /// Denominator for ScreenTickValue and BlockTickValue.
235 
236  /// Denominator for ContractSize.
238 
239  /// The product id for the market. For options, the ProductID will be that
240  /// of the underlying product.
242 
243  /// Number of cycles (days, hours, MWh, etc) for a contract.
245 
246  /// Default constructor.
248 
249  /// Initialize from raw message data.
250  OptionsProductDefinition(const char* data, size_t dataSize);
251 
252  /// Deserialize from raw data.
253  void deserialize(const char* data, size_t dataSize);
254 
255  /// Reset all fields to default values.
256  void reset();
257 
258  /// Returns string representation.
259  std::string toString() const;
260 };
261 
262 /// Make it printable using C++ I/O streams.
263 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const OptionsProductDefinition&);
264 
265 }}}} // namespace MarketData, iMpact, ICE, OnixS
short MarketType
Alias for market types.
Definition: Types.h:36
short screenLastTradeMonth
Screen last trade month, range 1-12.
This nested class represents block details definition.
This class represents the Options Product Definition Message.
Optional< char > contractSizeDenominator
Denominator for ContractSize.
long long Price
Alias for order identifiers type.
Definition: Types.h:54
bool crossOrderSupported
Indicates if Cross order is supported in the market.
int incrementQty
Minimum increment quantity for this market.
char numDecimalsStrikePrice
Denominator for the strike price field.
Price minOptionsPrice
Minimum premium price for the option.
bool flexAllowed
Indicates if flexible strikes can be created for the option market.
std::string contractSymbol
See Naming Convention on Appendix D.
int MarketId
Alias for market identifiers type.
Definition: Types.h:39
bool guaranteedCrossSupported
Indicates if Guarantee Cross is supported in the market.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
bool gtAllowed
Indicates if GTC is allowed in the market.
Optional< char > tickValueDenominator
Denominator for ScreenTickValue and BlockTickValue.
int numOfMarkets
The number of options markets for the given market type.
MarketType requestMarketType
See Appendix C for the list of market types and IDs.
OptionsExpirationType::Enum optionsExpirationType
Options expiration type.
Optional< int > numOfCycles
Number of cycles (days, hours, MWh, etc) for a contract.
std::vector< BlockDetail > BlockDetails
Alias for collection of BlockDetails.
short screenLastTradeDay
Screen last trade day of the month.
Price maxOptionsPrice
Maximum premium price for the option.
TradingStatus::Enum tradingStatus
See Appendix A on trading status codes.
int incrementPremiumPrice
Price increment for the option market.
std::string currency
The currency that the market is traded on.
bool isTradable
Indicates if the contract is tradable.
char orderPriceDenominator
Denominator for the order price fields in this market.
Optional< bool > overrideBlockMin
Indicates whether the Block Minimum can be overridden for the market.
Enum
Option settlement type constants.
Definition: Enumerations.h:189
MarketId marketId
Unique identifier of the option market.