OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.11.0
API documentation
NewOptionsStrategyDefinition.h
Go to the documentation of this file.
1 /**
2  * \file
3  * \brief Declare `OnixS::ICE::iMpact::MarketData::NewOptionsStrategyDefinition` 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 New Options Strategy Definition Message.
38 struct ONIXS_ICEMDH_EXPORT NewOptionsStrategyDefinition
39 {
40  /// Message type constant
41  enum { messageType = 'U' };
42 
43  /// Unique identifier of the market.
45 
46  /// Unique identifier of the underlying market.
48 
49  /// See Naming Convention on Appendix D.
50  std::string contractSymbol;
51 
52  /// See Appendix A on trading status codes.
54 
55  /// Denominator for the order price fields in this market.
57 
58  /// Minimum increment premium price for this market.
60 
61  /// Minimum increment quantity for this market.
63 
64  /// Minimum quantity for this market.
65  int minQty;
66 
67  /// Contains the Strategy Code for defined market where applicable. See
68  /// Appendix E for list of codes.
70 
71  /// Indicates if Market is only tradable via ICE Block Trade. This also
72  /// means the screen trading is not allowed for the market.
74 
75  /// Strategy Symbol.
76  std::string strategySymbol;
77 
78  /// Indicates if GTC is allowed in the market.
79  bool gtAllowed;
80 
81  /// Indicates MIFID-II market.
83 
84  /// Denominator for the deal price fields in the market. For most markets,
85  /// this is the same as `OrderPriceDenominator`.
87 
88  /// Denominator for the settlement price fields in the market. For most
89  /// markets, this is the same as `DealPriceDenominator`.
91 
92  /// Denominator for `UnitQuantity`. This field will be `0` for most of the
93  /// markets.
95 
96  /// Indicates Test Market.
98 
99  /// Extra contract symbol. Some contract symbols might contain more than
100  /// 35 characters. Clients should append this field to ContractSymbol
101  /// (Offset 11) to get the complete contract symbol.
102  std::string contractSymbolExtra;
103 
104  /// Indicates whether leg deals are suppressed.
106 
107  /// Indicates if the contract is tradable.
109 
110  /// Number of cycle (days, hours, MWh, etc.) for a contract.
111  short numOfCycles;
112 
113  /// 4 digit year. Last date that the option market can be traded and
114  /// should be removed from the system.
116 
117  /// Month range 1-12. Last date that the option market can be traded and
118  /// should be removed from the system.
120 
121  /// Day of the month. Last date that the option market can be traded and
122  /// should be removed from the system.
124 
125  /// See Appendix C for the list of makret types and IDs.
127 
128  /// Indicates whether the Block Minimum can be overridden for the market.
130 
131  /// This nested class represents leg definition.
132  struct ONIXS_ICEMDH_EXPORT Leg
133  {
134  /// Market Id of the option leg market.
136 
137  /// Futures market id of the underlying futures market.
139 
140  /// Number of option contracts per increment quantity.
141  short ratio;
142 
143  /// Leg side.
145 
146  /// The strategy code for the leg. If set, this field can be used to
147  /// obtain the next level of granularity of the strategy. If it is not
148  /// set, the /c LegMarketID is the most granular level for the market. See
149  /// Appendix E for list of codes.
151 
152  /// The quantity ratio represents the proportion of each of the leg of
153  /// interproduct spreads. Using Gas Oil crack as an example. This will be
154  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
156 
157  /// The quantity ratio represents the proportion of each of the leg of
158  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
159  /// most products not but will be used in future product launches.
161 
162  /// The price ratio is the fractional weighted price component per leg in
163  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
164  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
165  /// `LegRatioPriceNumerator`.
167 
168  /// The price ratio is the fractional weighted price component per leg in
169  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
170  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 3 as the
171  /// `LegRatioPriceDenominator`.
173 
174  /// Returns string representation.
175  std::string toString() const;
176  };
177 
178  /// Alias for collection of Legs.
179  typedef std::vector<Leg> Legs;
180 
181  /// Collection of Legs.
182  Legs legs;
183 
184  /// This nested class represents hedge definition.
185  struct ONIXS_ICEMDH_EXPORT Hedge
186  {
187  /// Future's market id of the hedge.
189 
190  /// Security type.
192 
193  /// Hedge side.
195 
196  /// Hedge price.
198 
199  /// Hedge price denominator.
201 
202  /// The strategy code for the leg. If set, this field can be used to
203  /// obtain the next level of granularity of the strategy. If it is not
204  /// set, the /c LegMarketID is the most granular level for the market. See
205  /// Appendix E for list of codes.
207 
208  /// Returns string representation.
209  std::string toString() const;
210  };
211 
212  /// Alias for collection of Hedges.
213  typedef std::vector<Hedge> Hedges;
214 
215  /// Collection of Hedges.
216  Hedges hedges;
217 
218  /// Default constructor.
220 
221  /// Initialize from raw message data.
222  NewOptionsStrategyDefinition(const char* data, size_t dataSize);
223 
224  /// Deserialize from raw data.
225  void deserialize(const char* data, size_t dataSize);
226 
227  /// Reset all fields to default values.
228  void reset();
229 
230  /// Returns string representation.
231  std::string toString() const;
232 };
233 
234 /// Make it printable using C++ I/O streams.
235 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const NewOptionsStrategyDefinition&);
236 
237 }}}} // namespace MarketData, iMpact, ICE, OnixS
bool legDealSuppressed
Indicates whether leg deals are suppressed.
char orderPriceDenominator
Denominator for the order price fields in this market.
short numOfCycles
Number of cycle (days, hours, MWh, etc.) for a contract.
std::string contractSymbol
See Naming Convention on Appendix D.
long long Price
Alias for order identifiers type.
Definition: Types.h:54
std::vector< Hedge > Hedges
Alias for collection of Hedges.
bool overrideBlockMin
Indicates whether the Block Minimum can be overridden for the market.
int MarketId
Alias for market identifiers type.
Definition: Types.h:39
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
TradingStatus::Enum tradingStatus
See Appendix A on trading status codes.
MarketId underlyingMarketId
Futures market id of the underlying futures market.
This class represents the New Options Strategy Definition Message.
MarketId underlyingMarketId
Unique identifier of the underlying market.
int incrementPrice
Minimum increment premium price for this market.
short ratio
Number of option contracts per increment quantity.
int incrementQty
Minimum increment quantity for this market.
short marketTypeId
See Appendix C for the list of makret types and IDs.
Enum
Trading side constants.
Definition: Enumerations.h:38