OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  18.0.1
API documentation
InstrumentLeg.h
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable OnixS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #pragma once
21 
27 
28 namespace OnixS
29 {
30  namespace Eurex
31  {
32  namespace MarketData
33  {
34 
35  /// Exposes list of available leg security types.
36  struct ONIXS_EUREX_EMDI_API LegSecurityType
37  {
38  enum Enum
39  {
40  /// Used to identify absence of value.
41  Undefined = -1,
42 
43  ///
44  PartOfMultilegInstrument = 0,
45 
46  ///
47  UnderlyingLeg = 1,
48  };
49  };
50 
51  ///
52  struct ONIXS_EUREX_EMDI_API RelatedPriceType
53  {
54  enum Enum
55  {
56  /// Used to identify absence of value.
57  Undefined = 0,
58 
59  ///
60  Basis = 1,
61  };
62  };
63 
64  /// Instrument leg entry.
65  class ONIXS_EUREX_EMDI_API InstrumentLeg : GroupInstance
66  {
67  public:
68 
69  /// Product identifier of the leg security.
70  UInt32 legSymbol () const
71  {
72  return getUInt32(Tags::LegSymbol);
73  }
74 
75  /// Instrument ID from Eurex Exchange’s new trading architecture
77  {
78  return getInt64 (Tags::LegSecurityID);
79  }
80 
81  /// Buy or Sell code
83  {
84  return getNonZeroIntEnumFieldValue<LegSide> (*this, Tags::LegSide);
85  }
86 
87  /// Type of leg security.
89  {
90  return getIntEnumFieldValue<LegSecurityType> (*this, Tags::LegSecurityType);
91  }
92 
93  /// The ratio of quantity for this individual leg relative to the entire multileg security.
95  {
96  return getUInt32(Tags::LegRatioQty);
97  }
98 
99  /// Underlying price for the instrument leg (for VOLA strategies)
100  bool legPrice (Decimal& price) const
101  {
102  return get (Tags::LegPrice).toNumber (price);
103  }
104 
105  ///
106  bool relatedPrice (Decimal& price) const
107  {
108  return get (Tags::RelatedPrice).toNumber (price);
109  }
110 
111  ///
113  {
114  return getIntEnumFieldValue<RelatedPriceType> (*this, Tags::RelatedPriceType);
115  }
116 
117  ///
119  {
120  return getIntEnumFieldValue<TradingStyle> (*this, Tags::TradingStyle);
121  }
122 
123 
124  private:
125  friend class TypedGroup<InstrumentLeg>;
126 
127  InstrumentLeg (const GroupInstance& groupInstance)
128  : GroupInstance (groupInstance)
129  {
130  }
131  };
132  }
133  }
134 }
Exposes list of available leg security types.
Definition: InstrumentLeg.h:36
UInt32 legRatioQty() const
The ratio of quantity for this individual leg relative to the entire multileg security.
Definition: InstrumentLeg.h:94
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
RelatedPriceType::Enum relatedPriceType() const
bool relatedPrice(Decimal &price) const
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
LegSide::Enum legSide() const
Buy or Sell code.
Definition: InstrumentLeg.h:82
LegSecurityType::Enum legSecurityType() const
Type of leg security.
Definition: InstrumentLeg.h:88
SecurityId legSecurityId() const
Instrument ID from Eurex Exchange’s new trading architecture.
Definition: InstrumentLeg.h:76
TradingStyle::Enum tradingStyle() const
bool legPrice(Decimal &price) const
Underlying price for the instrument leg (for VOLA strategies)
UInt32 legSymbol() const
Product identifier of the leg security.
Definition: InstrumentLeg.h:70