OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.18.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 "../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 New Futures Strategy Definition Message.
38 struct ONIXS_ICEMDH_EXPORT NewFuturesStrategyDefinition
39 {
40  /// Message type constant
41  enum
42  {
43  messageType = '9'
44  };
45 
46  /// Unique identifier of the 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  /// Description of the market.
85  std::string marketDesc;
86 
87  /// 4 digit year.
88  short maturityYear;
89 
90  /// Month range 1-12.
92 
93  /// Day of the month.
94  short maturityDay;
95 
96  /// Denominator for the deal price fields in the market. For most markets,
97  /// this is the same as `OrderPriceDenominator`. However, it could be
98  /// different for some crack or spread markets.
100 
101  /// The quantity in unit of measurement per lot. For example, it is 1000
102  /// barrels per lot for Brent. `UnitQtyDenominator` should be applied to
103  /// get correct `UnitQuantity`.
105 
106  /// Only used for `OffExchangeIncrementOptionPrice`.
108 
109  /// Indicate if the market supports option markets.
111 
112  /// Clearing limit admin related.
113  std::string clearedAlias;
114 
115  /// Indicate if implication is done for a given spread market and its
116  /// given outright leg markets.
118 
119  /// Minimum Price. `OrderPriceDenominator` should be applied to this
120  /// field.
122 
123  /// Maximum Price. `OrderPriceDenominator` should be applied to this
124  /// field.
126 
127  /// Name of the product that the contract/market is under.
128  std::string productName;
129 
130  /// Alias of the hub for the contract/market.
131  std::string hubAlias;
132 
133  /// Name of the strip for the contract/market.
134  std::string stripName;
135 
136  /// Indicate if the contract is tradable.
138 
139  /// Denominator for the settlement price fields in the market. For most
140  /// markets, this is the same as DealPriceDenominator.
142 
143  /// Market Identifier Code for the market.
144  std::string micCode;
145 
146  /// Denominator for UnitQuantity. Clients should also apply
147  /// UnitQtyDenominator when calculating LotSize. This field will be `0`
148  /// for most of the markets.
150 
151  /// Indicate if the contract is for hedge only.
152  bool hedgeOnly;
153 
154  /// Exchange silo code for the market.
156 
157  /// Denominator for `OffExchangeIncrementQty`.
159 
160  /// Off exchange increment qty. `OffExchangeIncrementQtyDenominator`
161  /// should be applied to this field.
163 
164  /// Off exchange increment price. `OrderPriceDenominator` should be
165  /// applied to this field.
167 
168  /// Off exchange options increment price. `NumDecimalsOptionsPrice` should
169  /// be applied to this field.
171 
172  /// ID of the product that the contract/market is under.
174 
175  /// ID of the hub for the contract/market.
176  int hubId;
177 
178  /// ID of the strip for the contract/market.
179  int stripId;
180 
181  /// The ISIN of the security this market is associated with. This is
182  /// currently only populated for Liffe Equity markets.
183  std::string underlyingISIN;
184 
185  /// Indicates Test Market.
187 
188  /// Indicates whether leg deals are suppressed.
190 
191  /// See Appendix C for the list of makret types and IDs.
193 
194  /// Indicates whether the Block Minimum can be overridden for the market.
196 
197  /// Numeric Number of cycles (days, hours, MWh, etc) for a contract.
199 
200  /// Unit of measure.
201  std::string unitOfMeasure;
202 
203  /// Currency.
204  std::string currency;
205 
206  /// This nested class represents leg definition.
207  struct ONIXS_ICEMDH_EXPORT Leg
208  {
209  /// Market Id of the futures leg market.
211 
212  /// Number of futures contracts per increment quantity.
213  short ratio;
214 
215  /// Leg side.
217 
218  /// The strategy code for the leg. If set, this field can be used to
219  /// obtain the next level of granularity of the strategy. If it is not
220  /// set, the /c LegMarketID is the most granular level for the market. See
221  /// Appendix E for list of codes.
223 
224  /// The quantity ratio represents the proportion of each of the leg of
225  /// interproduct spreads. Using Gas Oil crack as an example. This will be
226  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
228 
229  /// The quantity ratio represents the proportion of each of the leg of
230  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
231  /// most products not but will be used in future product launches.
233 
234  /// The price ratio is the fractional weighted price component per leg in
235  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
236  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
237  /// `LegRatioPriceNumerator`.
239 
240  /// The price ratio is the fractional weighted price component per leg in
241  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
242  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 3 as the
243  /// `LegRatioPriceDenominator`.
245 
246  /// Default constructor.
247  Leg();
248 
249  /// Returns string representation.
250  std::string toString() const;
251  };
252 
253  /// Alias for collection of Legs.
254  typedef std::vector<Leg> Legs;
255 
256  /// Collection of Legs.
257  Legs legs;
258 
259  /// Default constructor.
261 
262  /// Initialize from raw message data.
263  NewFuturesStrategyDefinition(const char* data, std::size_t dataSize);
264 
265  /// Deserialize from raw data.
266  void deserialize(const char* data, std::size_t dataSize);
267 
268  /// Reset all fields to default values.
269  void reset();
270 
271  /// Returns string representation.
272  std::string toString() const;
273 };
274 
275 /// Make it printable using C++ I/O streams.
276 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const NewFuturesStrategyDefinition&);
277 
278 }}}} // namespace OnixS::ICE::iMpact::MarketData
bool hedgeOnly
Indicate if the contract is for hedge only.
int numOfCycles
Numeric Number of cycles (days, hours, MWh, etc) for a contract.
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:841
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