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