OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.18.0
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 "../Enumerations.h"
27 #include "../Export.h"
28 #include "../Optional.h"
29 #include "../Types.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
42  {
43  messageType = 'p'
44  };
45 
46  /// The original request sequence ID assigned by client, unique per
47  /// session.
49 
50  /// See Appendix C for the list of market types and IDs.
52 
53  /// Unique identifier of the option market.
55 
56  /// Underlying Futures/OTC market id. This market id links to the product
57  /// definition of the futures market.
59 
60  /// See Naming Convention on Appendix D.
61  std::string contractSymbol;
62 
63  /// See Appendix A on trading status codes.
65 
66  /// Denominator for the order price fields in this market.
68 
69  /// Minimum increment quantity for this market.
71 
72  /// The lot size is minimum size of contracts in lots. It is multiplier to
73  /// determine the total lots.
74  int lotSize;
75 
76  /// Description of the market.
77  std::string marketDesc;
78 
79  /// Option type.
81 
82  /// Strike Price of the option. Used in conjunction with the
83  /// NumDecimalsStrikePrice. This is often different from the premium price
84  /// decimals.
86 
87  /// Denominator for the deal price fields in the market. For most markets,
88  /// this is the same as OrderPriceDenominator.
90 
91  /// Minimum quantity for this market.
92  int minQty;
93 
94  /// The currency that the market is traded on.
95  std::string currency;
96 
97  /// Denominator for the strike price field.
99 
100  /// Minimum premium price for the option.
102 
103  /// Maximum premium price for the option.
105 
106  /// Price increment for the option market.
108 
109  /// 4 digit year.
111 
112  /// Month range 1-12.
114 
115  /// Day of the month.
117 
118  /// Options style.
120 
121  /// Options expiration type.
123 
124  /// The number of options markets for the given market type.
126 
127  /// The underlying futures market ID for a serial option. The serial
128  /// option market may or may not be a valid futures month and option will
129  /// expire/exercise into a position held in this underlying market. It
130  /// will be set to `-1` when not applicable.
132 
133  /// Extra contract symbol. Some contract symbols might contain more than
134  /// 35 characters. Clients should append this field to ContractSymbol
135  /// (Offset 19) to get the complete contract symbol.
136  std::string contractSymbolExtra;
137 
138  /// Denominator for the settlement price fields in the market. For most
139  /// markets, this is the same as DealPriceDenominator.
141 
142  /// Denominator for UnitQuantity. This field will be `0` for most of the
143  /// markets.
145 
146  /// Use `ScreentickValue` and BlockTickValue instead of this field.
147  /// `OrderPriceDenominator` should be applied to get the real value.
148  long long oldTickValue;
149 
150  /// Indicates if flexible strikes can be created for the option market.
152 
153  /// Settlement type.
155 
156  /// Indicates if Market is only tradable via ICE Block Trade. This also
157  /// means the screen trading is not allowed for the market.
159 
160  /// Indicates if GTC is allowed in the market.
161  bool gtAllowed;
162 
163  /// Indicates if Cross order is supported in the market.
165 
166  /// Indicates if Guarantee Cross is supported in the market.
168 
169  /// Unit Of Measure.
170  std::string unitOfMeasure;
171 
172  /// Indicates MIFID-II market.
174 
175  /// Indicates Test Market.
177 
178  /// This ISIN is only supported for MiFID Regulated Markets. Of the MiFID
179  /// markets, only Futures and Options markets will support ISINs; some
180  /// strategies will have an ISIN.
181  std::string isin;
182 
183  /// Screen last trade year, 4 digits.
185 
186  /// Screen last trade month, range 1-12.
188 
189  /// Screen last trade day of the month.
191 
192  /// Indicates if the contract is tradable.
194 
195  /// This nested class represents block details definition.
196  struct ONIXS_ICEMDH_EXPORT BlockDetail
197  {
198  /// Block Type.
200 
201  /// Trade Type.
203 
204  /// Minimum Quantity. `OffExchangeIncrementQtyDenominator` should be
205  /// applied to this field.
206  long long minQty;
207 
208  /// Default constructor.
209  BlockDetail();
210 
211  /// Returns string representation.
212  std::string toString() const;
213  };
214 
215  /// Alias for collection of BlockDetails.
216  typedef std::vector<BlockDetail> BlockDetails;
217 
218  /// Collection of BlockDetails.
219  BlockDetails blockDetails;
220 
221  /// Indicates whether the Block Minimum can be overridden for the market.
223 
224  /// The deliverable quantity of a stock, commodity, or other financial
225  /// instrument that underlies a futures or options contract.
227 
228  /// Identifies the monetary amount per tick move when calculated from the
229  /// Central Limit Order Book.
231 
232  /// Identifies the monetary amount per tick move when calculated for Off-
233  /// Exchange trades.
235 
236  /// Denominator for ScreenTickValue and BlockTickValue.
238 
239  /// Denominator for ContractSize.
241 
242  /// The product id for the market. For options, the ProductID will be that
243  /// of the underlying product.
245 
246  /// Number of cycles (days, hours, MWh, etc) for a contract.
248 
249  /// Default constructor.
251 
252  /// Initialize from raw message data.
253  OptionsProductDefinition(const char* data, std::size_t dataSize);
254 
255  /// Deserialize from raw data.
256  void deserialize(const char* data, std::size_t dataSize);
257 
258  /// Reset all fields to default values.
259  void reset();
260 
261  /// Returns string representation.
262  std::string toString() const;
263 };
264 
265 /// Make it printable using C++ I/O streams.
266 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const OptionsProductDefinition&);
267 
268 }}}} // namespace OnixS::ICE::iMpact::MarketData
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.