OnixS C++ Eurex T7 Market and Reference Data (EMDI, MDI, RDI, EOBI) Handlers  17.0.1
API documentation
CrossRequest.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  ///
36  struct ONIXS_EUREX_EMDI_API CrossRequestType
37  {
38  enum Enum
39  {
40  /// Used to identify absence of value.
41  Undefined = -1,
42 
43  ///
44  CrossAnnouncement = 0,
45 
46  ///
47  LiquidityImprovementCross = 1,
48  };
49  };
50 
51  ///
52  struct ONIXS_EUREX_EMDI_API InputSource
53  {
54  enum Enum
55  {
56  /// Used to identify absence of value.
57  Undefined = -1,
58 
59  ///
60  ClientBroker = 0,
61  };
62  };
63 
64  /// Cross request
65  class ONIXS_EUREX_EMDI_API CrossRequest : public Message
66  {
67  public:
68  /// Product identifier.
70  {
71  return getUInt32 (Tags::MarketSegmentID);
72  }
73 
74  /// Instrument identifier.
76  {
77  return getInt64 (Tags::SecurityID);
78  }
79 
80  /// Defines the requested quantity which cannot be zero in a cross request.
81  bool orderQty(Decimal& quantity) const
82  {
83  return get(Tags::OrderQty).toNumber(quantity);
84  }
85 
86  /// Cross Request Type
88  {
89  return getIntEnumFieldValue<CrossRequestType>(*this, Tags::CrossRequestType);
90  }
91 
92  /// Price of the Liquidity Improvement Cross
93  bool price(Decimal& price) const
94  {
95  return get(Tags::MDEntryPx).toNumber(price);
96  }
97 
98  /// Time when request was processed by the matcher (nanoseconds).
99  UInt64 transactTime() const
100  {
101  return getUInt64 (Tags::TransactTime);
102  }
103 
104  /// Input source
106  {
107  return getIntEnumFieldValue<InputSource>(getGroup(Tags::NoCrossRequestSideGrp).at(0), Tags::InputSource);
108  }
109 
110  /// Side
111  Side::Enum side() const
112  {
113  return getIntEnumFieldValue<Side>(getGroup(Tags::NoCrossRequestSideGrp).at(0), Tags::Side);
114  }
115 
116  private:
117  friend class CrossRequestWrapper;
118 
119  CrossRequest (const void* impl)
120  : Message (impl)
121  {
122  }
123  };
124  }
125  }
126 }
const Tag NoCrossRequestSideGrp
Definition: Tags.h:257
InputSource::Enum inputSource() const
Input source.
Definition: CrossRequest.h:105
CrossRequestType::Enum crossRequestType() const
Cross Request Type.
Definition: CrossRequest.h:87
bool price(Decimal &price) const
Price of the Liquidity Improvement Cross.
Definition: CrossRequest.h:93
Side::Enum side() const
Side.
Definition: CrossRequest.h:111
unsigned int UInt32
Definition: Numeric.h:41
UInt32 getMarketSegmentID() const
Product identifier.
Definition: CrossRequest.h:69
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
UInt64 transactTime() const
Time when request was processed by the matcher (nanoseconds).
Definition: CrossRequest.h:99
Int64 SecurityId
Alias for Security Id type.
Definition: Defines.h:51
bool orderQty(Decimal &quantity) const
Defines the requested quantity which cannot be zero in a cross request.
Definition: CrossRequest.h:81
SecurityId securityId() const
Instrument identifier.
Definition: CrossRequest.h:75