OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.17.0
API documentation
FuturesStrategyDefinition.h
Go to the documentation of this file.
1 /**
2  * \file
3  * \brief Declare `OnixS::ICE::iMpact::MarketData::FuturesStrategyDefinition` 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 "../Time.h"
30 #include "../Optional.h"
31 
32 #include <iosfwd>
33 #include <string>
34 #include <vector>
35 
36 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
37 
38 /// This class represents the Futures Strategy Definition Response Message.
39 struct ONIXS_ICEMDH_EXPORT FuturesStrategyDefinition
40 {
41  /// Message type constant
42  enum { messageType = 'd' };
43 
44  /// The original request sequence ID assigned by client, unique per
45  /// session.
47 
48  /// See Appendix C for the list of market types and IDs.
50 
51  /// Unique identifier of the market.
53 
54  /// See Naming Convention on Appendix D.
55  std::string contractSymbol;
56 
57  /// See Appendix A on trading status codes.
59 
60  /// Denominator for the order price fields in this market.
62 
63  /// Minimum increment premium price for this market.
65 
66  /// Minimum increment quantity for this market.
68 
69  /// Minimum quantity for this market.
70  int minQty;
71 
72  /// Contains the Strategy Code for defined market where applicable. See
73  /// Appendix E for list of codes.
75 
76  /// Indicates if Market is only tradable via ICE Block Trade. This also
77  /// means the screen trading is not allowed for the market.
79 
80  /// The number of markets for the given market type.
82 
83  /// Strategy Symbol.
84  std::string strategySymbol;
85 
86  /// Indicates if GTC is allowed in the market.
87  bool gtAllowed;
88 
89  /// Indicates MIFID-II market.
91 
92  /// Description of the market.
93  std::string marketDesc;
94 
95  /// 4 digit year.
96  short maturityYear;
97 
98  /// Month range 1-12.
100 
101  /// Day of the month.
102  short maturityDay;
103 
104  /// Denominator for the deal price fields in the market. For most markets,
105  /// this is the same as `OrderPriceDenominator`.
107 
108  /// The quantity in unit of measurement per lot. For example, it is 1000
109  /// barrels per lot for Brent. `UnitQtyDenominator` should be applied to
110  /// get correct `UnitQuantity`.
112 
113  /// Only used for `OffExchangeIncrementOptionPrice`.
115 
116  /// Indicate if the market supports option markets.
118 
119  /// Clearing limit admin related.
120  std::string clearedAlias;
121 
122  /// Indicate if implication is done for a given spread market and its
123  /// given outright leg markets.
125 
126  /// Minimum Price. `OrderPriceDenominator` should be applied to this
127  /// field.
129 
130  /// Maximum Price. `OrderPriceDenominator` should be applied to this
131  /// field.
133 
134  /// Name of the product that the contract/market is under.
135  std::string productName;
136 
137  /// Alias of the hub for the contract/market.
138  std::string hubAlias;
139 
140  /// Name of the strip for the contract/market.
141  std::string stripName;
142 
143  /// Indicate if the contract is tradable.
145 
146  /// Denominator for the settlement price fields in the market. For most
147  /// markets, this is the same as `DealPriceDenominator`.
149 
150  /// Market Identifier Code for the market.
151  std::string micCode;
152 
153  /// Denominator for `UnitQuantity`. This field will be `0` for most of the
154  /// markets.
156 
157  /// Indicate if the contract is for hedge only.
158  bool hedgeOnly;
159 
160  /// Exchange silo code for the market.
162 
163  /// Denominator for `OffExchangeIncrementQty`.
165 
166  /// Off exchange increment qty. `OffExchangeIncrementQtyDenominator`
167  /// should be applied to this field.
169 
170  /// Off exchange increment price. `OrderPriceDenominator` should be
171  /// applied to this field.
173 
174  /// Off exchange options increment price. `NumDecimalsOptionsPrice` should
175  /// be applied to this field.
177 
178  /// ID of the product that the contract/market is under.
180 
181  /// ID of the hub for the contract/market.
182  int hubId;
183 
184  /// ID of the strip for the contract/market.
185  int stripId;
186 
187  /// The ISIN of the security this market is associated with. This is
188  /// currently only populated for Liffe Equity markets.
189  std::string underlyingISIN;
190 
191  /// Indicates Test Market.
193 
194  /// Indicates whether leg deals are suppressed.
196 
197  /// This nested class represents leg definition.
198  struct ONIXS_ICEMDH_EXPORT Leg
199  {
200  /// Market Id of the futures leg market.
202 
203  /// Number of futures contracts per increment quantity.
204  short ratio;
205 
206  /// Leg side.
208 
209  /// The strategy code for the leg. If set, this field can be used to
210  /// obtain the next level of granularity of the strategy. If it is not
211  /// set, the /c LegMarketID is the most granular level for the market. See
212  /// Appendix E for list of codes.
214 
215  /// The quantity ratio represents the proportion of each of the leg of
216  /// interproduct spreads. Using Gas Oil crack as an example. This will be
217  /// set to 4 for the Gas oil leg and 3 for the Brent leg.
219 
220  /// The quantity ratio represents the proportion of each of the leg of
221  /// interproduct spreads. The Leg ratio denominator will be set to `1` for
222  /// most products not but will be used in future product launches.
224 
225  /// The price ratio is the fractional weighted price component per leg in
226  /// the strategy. Using a Q4 2017 set as composite strategy as an example,
227  /// each leg Oct 2017, Nov 2017 and Dec 2017 will have 1 as the
228  /// `LegRatioPriceNumerator`.
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 3 as the
234  /// `LegRatioPriceDenominator`.
236 
237  /// Default constructor.
238  Leg();
239 
240  /// Returns string representation.
241  std::string toString() const;
242  };
243 
244  /// Alias for collection of Legs.
245  typedef std::vector<Leg> Legs;
246 
247  /// Collection of Legs.
248  Legs legs;
249 
250  /// This nested class represents block details definition.
251  struct ONIXS_ICEMDH_EXPORT BlockDetail
252  {
253  /// Block Type.
255 
256  /// Trade Type.
258 
259  /// Minimum Quantity. `OffExchangeIncrementQtyDenominator` should be
260  /// applied to this field.
261  long long minQty;
262 
263  /// Default constructor.
264  BlockDetail();
265 
266  /// Returns string representation.
267  std::string toString() const;
268  };
269 
270  /// Alias for collection of BlockDetails.
271  typedef std::vector<BlockDetail> BlockDetails;
272 
273  /// Collection of BlockDetails.
274  BlockDetails blockDetails;
275 
276  /// Unit Of Measure.
278 
279  /// Hub Name.
281 
282  /// Sent for customs with StrategyCodes 414, 550, 711, 713, 714, 715, and
283  /// 716 and for future use when combos with.
285 
286  /// Sent for customs with StrategyCodes 414, 550, 711, 713, 714, 715, and
287  /// 716.
289 
290  /// Sent for customs with StrategyCodes 414, 550, 711, 713, 714, 715, and
291  /// 716.
293 
294  /// Indicates whether the Block Minimum can be overridden for the market.
296 
297  /// Identifies the monetary amount per tick move when calculated from the
298  /// Central Limit Order Book.
300 
301  /// Identifies the monetary amount per tick move when calculated for Off-
302  /// Exchange trades.
304 
305  /// Denominator for ScreenTickValue and BlockTickValue.
307 
308  /// Number of cycles (days, hours, MWh, etc) for a contract.
310 
311  /// Currency.
313 
314  /// Default constructor.
316 
317  /// Initialize from raw message data.
318  FuturesStrategyDefinition(const char* data, size_t dataSize);
319 
320  /// Deserialize from raw data.
321  void deserialize(const char* data, size_t dataSize);
322 
323  /// Reset all fields to default values.
324  void reset();
325 
326  /// Returns string representation.
327  std::string toString() const;
328 };
329 
330 /// Make it printable using C++ I/O streams.
331 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const FuturesStrategyDefinition&);
332 
333 }}}} // namespace MarketData, iMpact, ICE, OnixS
std::string contractSymbol
See Naming Convention on Appendix D.
int incrementPrice
Minimum increment premium price for this market.
Optional< int > numOfCycles
Number of cycles (days, hours, MWh, etc) for a contract.
std::string micCode
Market Identifier Code for the market.
short MarketType
Alias for market types.
Definition: Types.h:36
std::vector< BlockDetail > BlockDetails
Alias for collection of BlockDetails.
int productId
ID of the product that the contract/market is under.
short ratio
Number of futures contracts per increment quantity.
long long Price
Alias for order identifiers type.
Definition: Types.h:54
std::vector< Leg > Legs
Alias for collection of Legs.
bool allowOptions
Indicate if the market supports option markets.
char numDecimalsOptionsPrice
Only used for OffExchangeIncrementOptionPrice.
int MarketId
Alias for market identifiers type.
Definition: Types.h:39
char offExchangeIncrementQtyDenominator
Denominator for OffExchangeIncrementQty.
std::string hubAlias
Alias of the hub for the contract/market.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
ExchangeSilo::Enum exchangeSilo
Exchange silo code for the market.
std::string stripName
Name of the strip for the contract/market.
MarketType requestMarketType
See Appendix C for the list of market types and IDs.
std::string productName
Name of the product that the contract/market is under.
Enum
Exchange silo code for the market.
Definition: Enumerations.h:841
Optional< char > tickValueDenominator
Denominator for ScreenTickValue and BlockTickValue.
int numOfMarkets
The number of markets for the given market type.
bool legDealSuppressed
Indicates whether leg deals are suppressed.
TradingStatus::Enum tradingStatus
See Appendix A on trading status codes.
char orderPriceDenominator
Denominator for the order price fields in this market.
int incrementQty
Minimum increment quantity for this market.
This class represents the Futures Strategy Definition Response Message.
bool hedgeOnly
Indicate if the contract is for hedge only.
bool gtAllowed
Indicates if GTC is allowed in the market.
Optional< bool > overrideBlockMin
Indicates whether the Block Minimum can be overridden for the market.
Enum
Trading side constants.
Definition: Enumerations.h:38