OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.11.0
API documentation
NewFuturesStrategyDefinition.h
Go to the documentation of this file.
1 /**
2  * \file
3  * \brief Declare `OnixS::ICE::iMpact::MarketData::NewFuturesStrategyDefinition` 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 Futures Strategy Definition Message.
38 struct ONIXS_ICEMDH_EXPORT NewFuturesStrategyDefinition
39 {
40  /// Message type constant
41  enum { messageType = '9' };
42 
43  /// Unique identifier of the market.
45 
46  /// See Naming Convention on Appendix D.
47  std::string contractSymbol;
48 
49  /// See Appendix A on trading status codes.
51 
52  /// Denominator for the order price fields in this market.
54 
55  /// Minimum increment premium price for this market.
57 
58  /// Minimum increment quantity for this market.
60 
61  /// Minimum quantity for this market.
62  int minQty;
63 
64  /// Contains the Strategy Code for defined market where applicable. See
65  /// Appendix E for list of codes.
67 
68  /// Indicates if Market is only tradable via ICE Block Trade. This also
69  /// means the screen trading is not allowed for the market.
71 
72  /// Strategy Symbol.
73  std::string strategySymbol;
74 
75  /// Indicates if GTC is allowed in the market.
76  bool gtAllowed;
77 
78  /// Indicates MIFID-II market.
80 
81  /// Description of the market.
82  std::string marketDesc;
83 
84  /// 4 digit year.
85  short maturityYear;
86 
87  /// Month range 1-12.
89 
90  /// Day of the month.
91  short maturityDay;
92 
93  /// Denominator for the deal price fields in the market. For most markets,
94  /// this is the same as `OrderPriceDenominator`. However, it could be
95  /// different for some crack or spread markets.
97 
98  /// The quantity in unit of measurement per lot. For example, it is 1000
99  /// barrels per lot for Brent. `UnitQtyDenominator` should be applied to
100  /// get correct `UnitQuantity`.
102 
103  /// Only used for `OffExchangeIncrementOptionPrice`.
105 
106  /// Indicate if the market supports option markets.
108 
109  /// Clearing limit admin related.
110  std::string clearedAlias;
111 
112  /// Indicate if implication is done for a given spread market and its
113  /// given outright leg markets.
115 
116  /// Minimum Price. `OrderPriceDenominator` should be applied to this
117  /// field.
119 
120  /// Maximum Price. `OrderPriceDenominator` should be applied to this
121  /// field.
123 
124  /// Name of the product that the contract/market is under.
125  std::string productName;
126 
127  /// Alias of the hub for the contract/market.
128  std::string hubAlias;
129 
130  /// Name of the strip for the contract/market.
131  std::string stripName;
132 
133  /// Indicate if the contract is tradable.
135 
136  /// Denominator for the settlement price fields in the market. For most
137  /// markets, this is the same as DealPriceDenominator.
139 
140  /// Market Identifier Code for the market.
141  std::string micCode;
142 
143  /// Denominator for UnitQuantity. Clients should also apply
144  /// UnitQtyDenominator when calculating LotSize. This field will be `0`
145  /// for most of the markets.
147 
148  /// Indicate if the contract is for hedge only.
149  bool hedgeOnly;
150 
151  /// Exchange silo code for the market.
153 
154  /// Denominator for `OffExchangeIncrementQty`.
156 
157  /// Off exchange increment qty. `OffExchangeIncrementQtyDenominator`
158  /// should be applied to this field.
160 
161  /// Off exchange increment price. `OrderPriceDenominator` should be
162  /// applied to this field.
164 
165  /// Off exchange options increment price. `NumDecimalsOptionsPrice` should
166  /// be applied to this field.
168 
169  /// ID of the product that the contract/market is under.
171 
172  /// ID of the hub for the contract/market.
173  int hubId;
174 
175  /// ID of the strip for the contract/market.
176  int stripId;
177 
178  /// The ISIN of the security this market is associated with. This is
179  /// currently only populated for Liffe Equity markets.
180  std::string underlyingISIN;
181 
182  /// Indicates Test Market.
184 
185  /// Indicates whether leg deals are suppressed.
187 
188  /// See Appendix C for the list of makret types and IDs.
190 
191  /// Indicates whether the Block Minimum can be overridden for the market.
193 
194  /// Numeric Number of cycles (days, hours, MWh, etc) for a contract.
195  /// Replaces OldNumOfCycles.
197 
198  /// Unit of measure.
199  std::string unitOfMeasure;
200 
201  /// Currency.
202  std::string currency;
203 
204  /// This nested class represents leg definition.
205  struct ONIXS_ICEMDH_EXPORT Leg
206  {
207  /// Market Id of the futures leg market.
209 
210  /// Number of futures contracts per increment quantity.
211  short ratio;
212 
213  /// Leg side.
215 
216  /// The strategy code for the leg. If set, this field can be used to
217  /// obtain the next level of granularity of the strategy. If it is not
218  /// set, the /c LegMarketID is the most granular level for the market. See
219  /// Appendix E for list of codes.
221 
222  /// The quantity ratio represents the proportion of each of the leg of
223  /// interproduct spreads. Using Gas Oil crack as an example. This will be
224  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
226 
227  /// The quantity ratio represents the proportion of each of the leg of
228  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
229  /// most products not but will be used in future product launches.
231 
232  /// The price ratio is the fractional weighted price component per leg in
233  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
234  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
235  /// `LegRatioPriceNumerator`.
237 
238  /// The price ratio is the fractional weighted price component per leg in
239  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
240  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 3 as the
241  /// `LegRatioPriceDenominator`.
243 
244  /// Returns string representation.
245  std::string toString() const;
246  };
247 
248  /// Alias for collection of Legs.
249  typedef std::vector<Leg> Legs;
250 
251  /// Collection of Legs.
252  Legs legs;
253 
254  /// Default constructor.
256 
257  /// Initialize from raw message data.
258  NewFuturesStrategyDefinition(const char* data, size_t dataSize);
259 
260  /// Deserialize from raw data.
261  void deserialize(const char* data, size_t dataSize);
262 
263  /// Reset all fields to default values.
264  void reset();
265 
266  /// Returns string representation.
267  std::string toString() const;
268 };
269 
270 /// Make it printable using C++ I/O streams.
271 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const NewFuturesStrategyDefinition&);
272 
273 }}}} // namespace MarketData, iMpact, ICE, OnixS
bool hedgeOnly
Indicate if the contract is for hedge only.
short ratio
Number of futures contracts per increment quantity.
int productId
ID of the product that the contract/market is under.
long long Price
Alias for order identifiers type.
Definition: Types.h:54
bool overrideBlockMin
Indicates whether the Block Minimum can be overridden for the market.
char offExchangeIncrementQtyDenominator
Denominator for OffExchangeIncrementQty.
short marketTypeId
See Appendix C for the list of makret types and IDs.
int MarketId
Alias for market identifiers type.
Definition: Types.h:39
char numDecimalsOptionsPrice
Only used for OffExchangeIncrementOptionPrice.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
bool legDealSuppressed
Indicates whether leg deals are suppressed.
Enum
Exchange silo code for the market.
Definition: Enumerations.h:828
bool allowOptions
Indicate if the market supports option markets.
std::string contractSymbol
See Naming Convention on Appendix D.
int incrementPrice
Minimum increment premium price for this market.
TradingStatus::Enum tradingStatus
See Appendix A on trading status codes.
std::string stripName
Name of the strip for the contract/market.
std::string hubAlias
Alias of the hub for the contract/market.
int incrementQty
Minimum increment quantity for this market.
std::string productName
Name of the product that the contract/market is under.
char orderPriceDenominator
Denominator for the order price fields in this market.
This class represents the New Futures Strategy Definition Message.
std::string micCode
Market Identifier Code for the market.
ExchangeSilo::Enum exchangeSilo
Exchange silo code for the market.
Enum
Trading side constants.
Definition: Enumerations.h:38