OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.2.2
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  /// Instrument leg entry.
52  class ONIXS_EUREX_EMDI_API InstrumentLeg : GroupInstance
53  {
54  public:
55 
56  /// Product identifier of the leg security.
57  bool legSymbol (UInt32& symbol) const
58  {
59  return get (Tags::LegSymbol).toNumber (symbol);
60  }
61 
62  /// Instrument ID from Eurex Exchange’s new trading architecture
64  {
65  return getInt64 (Tags::LegSecurityID);
66  }
67 
68  /// Buy or Sell code
70  {
71  return getNonZeroIntEnumFieldValue<LegSide> (*this, Tags::LegSide);
72  }
73 
74  /// Type of leg security.
76  {
77  return getIntEnumFieldValue<LegSecurityType> (*this, Tags::LegSecurityType);
78  }
79 
80  /// The ratio of quantity for this individual leg relative to the entire multileg security.
81  bool legRatioQty (UInt32& quantity) const
82  {
83  return get (Tags::LegRatioQty).toNumber (quantity);
84  }
85 
86  /// Underlying price for the instrument leg (for VOLA strategies)
87  bool legPrice (Decimal& price) const
88  {
89  return get (Tags::LegPrice).toNumber (price);
90  }
91 
92  private:
93  friend class TypedGroup<InstrumentLeg>;
94 
95  InstrumentLeg (const GroupInstance& groupInstance)
96  : GroupInstance (groupInstance)
97  {
98  }
99  };
100  }
101  }
102 }
103 
Exposes list of available leg security types.
Definition: InstrumentLeg.h:36
bool legRatioQty(UInt32 &quantity) const
The ratio of quantity for this individual leg relative to the entire multileg security.
Definition: InstrumentLeg.h:81
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
LegSide::Enum legSide() const
Buy or Sell code.
Definition: InstrumentLeg.h:69
LegSecurityType::Enum legSecurityType() const
Type of leg security.
Definition: InstrumentLeg.h:75
bool legSymbol(UInt32 &symbol) const
Product identifier of the leg security.
Definition: InstrumentLeg.h:57
SecurityId legSecurityId() const
Instrument ID from Eurex Exchange’s new trading architecture.
Definition: InstrumentLeg.h:63
bool legPrice(Decimal &price) const
Underlying price for the instrument leg (for VOLA strategies)
Definition: InstrumentLeg.h:87