OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
PartialOrderExecution.cpp
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 
21 
22 #include "MessageDataStructures.h"
23 
24 #include "../Utils.h"
25 
26 namespace OnixS{
27 namespace Eurex{
28 namespace MarketData{
29 namespace EOBI{
30 
32 
33 std::string PartialOrderExecution::msgType() const
34 {
35  return std::string("U21", 3);
36 }
37 
39 {
40  return EOBI::MarketDataType::OrderBookExecution; // implied constant
41 }
42 
44 {
45  return EOBI::MDUpdateAction::Change; // implied constant
46 }
47 
49 {
50  return EOBI::SecurityIDSource::Marketplace; // implied constant
51 }
52 
54 {
55  return static_cast<EOBI::Side::Enum>((getData<PartialOrderExecutionMsgData>())->Side);
56 }
57 
59 {
60  return static_cast<EOBI::OrderType::Enum>((getData<PartialOrderExecutionMsgData>())->OrdType);
61 }
62 
64 {
65  return (getData<PartialOrderExecutionMsgData>())->TrdMatchID;
66 }
67 
69 {
70  const PartialOrderExecutionMsgData* msgData = getData<PartialOrderExecutionMsgData>();
72  return false;
73 
74  price = Decimal(msgData->Price/100000000.0, 8u);
75  return true;
76 }
77 
78 
80 {
81  return (getData<PartialOrderExecutionMsgData>())->TrdRegTSTimePriority;
82 }
83 
85 {
86  return (getData<PartialOrderExecutionMsgData>())->SecurityID;
87 }
88 
90 {
91  return (getData<PartialOrderExecutionMsgData>())->LastQty;
92 }
93 
95 {
96  return Decimal((getData<PartialOrderExecutionMsgData>())->LastPx/100000000.0, 8u);
97 }
98 
100 {
101  return static_cast<EOBI::AlgorithmicTradeIndicator::Enum>((getData<PartialOrderExecutionMsgData>())->AlgorithmicTradeIndicator);
102 }
103 
104 void PartialOrderExecution::toString(std::string& presentation) const
105 {
106  presentation
107  << "PartialOrderExecution [msgSeqNum="
108  << msgSeqNum()
109  << ", securityID="
110  << securityID()
111  << ", side="
112  << Side::toString(side())
113  << ", ordType=" << OrderType::toString(ordType())
114  << ", AlgorithmicTradeIndicator=" << AlgorithmicTradeIndicator::toString(algorithmicTradeIndicator());
115 
116  Decimal p;
117  if(price(p))
118  presentation << ", price=" << p.toString();
119 
120  presentation << ", trdRegTSTimePriority="
122  << ", trdMatchID="
123  << trdMatchID()
124  << ", lastQty="
125  << lastQty()
126  << ", lastPx="
127  << lastPx().toString();
128 
129 
130  presentation << ']';
131 }
132 
133 }}}}
EOBI::OrderType::Enum ordType() const
Reserved for future release.
std::string toString() const
Returns text presentation.
Definition: MessageBase.cpp:37
EOBI::Side::Enum side() const
Side of the order.
EOBI::MDUpdateAction::Enum mdUpdateAction() const
Type of Market Data update action.
UInt32 trdMatchID() const
Unique identifier for each price level (match step) of a match event; it is used for public trade rep...
QuantityType lastQty() const
Quantity executed in this fill.
unsigned int UInt32
Definition: Numeric.h:41
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
UInt32 msgSeqNum() const
Message sequence number.
Definition: MessageBase.cpp:32
bool price(Decimal &price) const
The price at which the order entered the book. Typically it is equal to Last-Px except during auction...
UInt64 securityID() const
Unique instrument identifier.
void toString(std::string &) const
Appends text presentation to given string.
Definition: Decimal.cpp:217
static std::string toString(Enum value)
Definition: Defines.cpp:611
static std::string toString(Enum value)
Definition: Defines.cpp:148
EOBI::Implementation::PartialOrderExecutionMsgData PartialOrderExecutionMsgData
EOBI::MarketDataType::Enum marketDataType() const
Market data type.
EOBI::AlgorithmicTradeIndicator::Enum algorithmicTradeIndicator() const
EOBI::SecurityIDSource::Enum securityIDSource() const
Marketplace assigned identifier.