OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
AuctionClearingPrice.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 #include "../Utils.h"
23 
24 namespace OnixS{
25 namespace Eurex{
26 namespace MarketData{
27 namespace EOBI{
28 
30 
31 std::string AuctionClearingPrice::msgType() const
32 {
33  return std::string("U23", 3);
34 }
35 
37 {
38  return EOBI::MarketDataType::AuctionClearingPrice; // implied constant
39 }
40 
42 {
43  return EOBI::SecurityIDSource::Marketplace; // implied constant
44 }
45 
47 {
48  return (getData<AuctionClearingPriceMsgData>())->TransactTime;
49 }
50 
52 {
53  return (getData<AuctionClearingPriceMsgData>())->SecurityID;
54 }
55 
57 {
58  return Decimal((getData<AuctionClearingPriceMsgData>())->LastPx/100000000.0, 8u);
59 }
60 
61 bool AuctionClearingPrice::lastQty (Int64& qty) const
62 {
63  const AuctionClearingPriceMsgData* msgData = getData<AuctionClearingPriceMsgData>();
65  return false;
66 
67  qty = msgData->LastQty;
68  return true;
69 }
70 
71 bool AuctionClearingPrice::imbalanceQty (Int64& qty) const
72 {
73  const AuctionClearingPriceMsgData* msgData = getData<AuctionClearingPriceMsgData>();
75  return false;
76 
77  qty = msgData->ImbalanceQty;
78  return true;
79 }
80 
82 {
83  return static_cast<EOBI::SecurityTradingStatus::Enum>((getData<AuctionClearingPriceMsgData>())->SecurityTradingStatus);
84 }
85 
87 {
88  return static_cast<EOBI::PotentialSecurityTradingEvent::Enum>((getData<AuctionClearingPriceMsgData>())->PotentialSecurityTradingEvent);
89 }
90 
91 void AuctionClearingPrice::toString(std::string& presentation) const
92 {
93  presentation
94  << "AuctionClearingPrice [msgSeqNum=" << msgSeqNum()
95  << ", TransactTime=" << transactTime()
96  << ", SecurityId=" << securityID()
97  << ", LastPx=" << lastPx().toString();
98 
99  Int64 qty;
100  if(lastQty(qty))
101  presentation << ", lastQty=" << qty;
102 
103  presentation << ", SecurityTradingStatus=" << SecurityTradingStatus::toString(securityTradingStatus())
104  << ", potentialSecurityTradingEvent=" << PotentialSecurityTradingEvent::toString(potentialSecurityTradingEvent());
105 
106  presentation << ']';
107 }
108 
109 }}}}
Decimal lastPx() const
Indicating the potential Auction price for a crossed order book.
UInt64 transactTime() const
Transaction timestamp.
std::string toString() const
Returns text presentation.
Definition: MessageBase.cpp:37
EOBI::MarketDataType::Enum marketDataType() const
Market data type.
EOBI::SecurityIDSource::Enum securityIDSource() const
Marketplace assigned identifier.
Definition: Defines.h:30
Decimal type for better precision.
Definition: Numeric.h:63
UInt32 msgSeqNum() const
Message sequence number.
Definition: MessageBase.cpp:32
UInt64 securityID() const
Unique instrument identifier.
PotentialSecurityTradingEvent::Enum potentialSecurityTradingEvent() const
SecurityTradingStatus::Enum securityTradingStatus() const
void toString(std::string &) const
Appends text presentation to given string.
Definition: Decimal.cpp:217
EOBI::Implementation::AuctionClearingPriceMsgData AuctionClearingPriceMsgData