OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.2.2
API documentation
FullOrderExecution.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 #include "MessageDataStructures.h"
22 
23 #include "../Utils.h"
24 
25 namespace OnixS{
26 namespace Eurex{
27 namespace MarketData{
28 namespace EOBI{
29 
31 
32 std::string FullOrderExecution::msgType() const
33 {
34  return std::string("U21", 3);
35 }
36 
38 {
39  return EOBI::MarketDataType::OrderBookExecution; // implied constant
40 }
41 
43 {
44  return EOBI::MDUpdateAction::Change; // implied constant
45 }
46 
48 {
49  return EOBI::SecurityIDSource::Marketplace; // implied constant
50 }
51 
53 {
54  return static_cast<EOBI::Side::Enum>((getData<FullOrderExecutionMsgData>())->Side);
55 }
56 
58 {
59  return static_cast<EOBI::OrderType::Enum>((getData<FullOrderExecutionMsgData>())->OrdType);
60 }
61 
63 {
64  return static_cast<EOBI::AlgorithmicTradeIndicator::Enum>((getData<FullOrderExecutionMsgData>())->AlgorithmicTradeIndicator);
65 }
66 
68 {
69  const FullOrderExecutionMsgData* msgData = getData<FullOrderExecutionMsgData>();
71  return false;
72 
73  value = Decimal(msgData->Price/100000000.0, 8u);
74  return true;
75 }
76 
78 {
79  return (getData<FullOrderExecutionMsgData>())->TrdRegTSTimePriority;
80 }
81 
83 {
84  return (getData<FullOrderExecutionMsgData>())->SecurityID;
85 }
86 
88 {
89  return (getData<FullOrderExecutionMsgData>())->TrdMatchID;
90 }
91 
93 {
94  return (getData<FullOrderExecutionMsgData>())->LastQty;
95 }
96 
98 {
99  return Decimal((getData<FullOrderExecutionMsgData>())->LastPx/100000000.0, 8u);
100 }
101 
102 void FullOrderExecution::toString(std::string& presentation) const
103 {
104  presentation
105  << "FullOrderExecution [msgSeqNum=" << msgSeqNum()
106  << ", Side=" << Side::toString(side())
107  << ", OrdType=" << OrderType::toString(ordType())
108  << ", AlgorithmicTradeIndicator=" << AlgorithmicTradeIndicator::toString(algorithmicTradeIndicator());
109 
110  Decimal p;
111  if(price(p))
112  presentation << ", Price=" << p.toString();
113 
114  presentation << ", TrdRegTSTimePriority=" << trdRegTSTimePriority()
115  << ", SecurityId=" << securityID()
116  << ", TrdMatchID=" << trdMatchID()
117  << ", LastQty=" << lastQty()
118  << ", LastPx=" << lastPx().toString();
119 
120  presentation << ']';
121 }
122 
123 }}}}
std::string toString() const
Returns text presentation.
Definition: MessageBase.cpp:37
EOBI::SecurityIDSource::Enum securityIDSource() const
Marketplace assigned identifier.
UInt64 trdRegTSTimePriority() const
Priority timestamp.
bool price(Decimal &price) const
The price at which the order entered the book. Typically it is equal to LastPx except during auction ...
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
EOBI::Implementation::FullOrderExecutionMsgData FullOrderExecutionMsgData
EOBI::Side::Enum side() const
Side of the order.
UInt64 securityID() const
Unique instrument identifier.
UInt32 trdMatchID() const
Unique identifier for each price level (match step) of a match event; it is used for public trade rep...
EOBI::AlgorithmicTradeIndicator::Enum algorithmicTradeIndicator() const
QuantityType lastQty() const
Quantity executed in this fill.
void toString(std::string &) const
Appends text presentation to given string.
Definition: Decimal.cpp:217
static std::string toString(Enum value)
Definition: Defines.cpp:608
EOBI::OrderType::Enum ordType() const
Reserved for future release.
static std::string toString(Enum value)
Definition: Defines.cpp:145
EOBI::MDUpdateAction::Enum mdUpdateAction() const
Type of Market Data update action.
EOBI::MarketDataType::Enum marketDataType() const
Market data type.