OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.15.1
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.
196 
197  /// Unit of measure.
198  std::string unitOfMeasure;
199 
200  /// Currency.
201  std::string currency;
202 
203  /// This nested class represents leg definition.
204  struct ONIXS_ICEMDH_EXPORT Leg
205  {
206  /// Market Id of the futures leg market.
208 
209  /// Number of futures contracts per increment quantity.
210  short ratio;
211 
212  /// Leg side.
214 
215  /// The strategy code for the leg. If set, this field can be used to
216  /// obtain the next level of granularity of the strategy. If it is not
217  /// set, the /c LegMarketID is the most granular level for the market. See
218  /// Appendix E for list of codes.
220 
221  /// The quantity ratio represents the proportion of each of the leg of
222  /// interproduct spreads. Using Gas Oil crack as an example. This will be
223  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
225 
226  /// The quantity ratio represents the proportion of each of the leg of
227  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
228  /// most products not but will be used in future product launches.
230 
231  /// The price ratio is the fractional weighted price component per leg in
232  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
233  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
234  /// `LegRatioPriceNumerator`.
236 
237  /// The price ratio is the fractional weighted price component per leg in
238  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
239  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 3 as the
240  /// `LegRatioPriceDenominator`.
242 
243  /// Default constructor.
244  Leg();
245 
246  /// Returns string representation.
247  std::string toString() const;
248  };
249 
250  /// Alias for collection of Legs.
251  typedef std::vector<Leg> Legs;
252 
253  /// Collection of Legs.
254  Legs legs;
255 
256  /// Default constructor.
258 
259  /// Initialize from raw message data.
260  NewFuturesStrategyDefinition(const char* data, size_t dataSize);
261 
262  /// Deserialize from raw data.
263  void deserialize(const char* data, size_t dataSize);
264 
265  /// Reset all fields to default values.
266  void reset();
267 
268  /// Returns string representation.
269  std::string toString() const;
270 };
271 
272 /// Make it printable using C++ I/O streams.
273 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const NewFuturesStrategyDefinition&);
274 
275 }}}} // namespace MarketData, iMpact, ICE, OnixS
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:836
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