OnixS C++ CBOE CFE Binary Order Entry (BOE) Handler  1.11.0
API documentation
MutableOrderModified.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 
22 #include <vector>
23 
28 
29 
30 namespace OnixS {
31 namespace CboeCFE {
32 namespace Trading {
33 namespace BOE {
34 namespace Testing {
35 
36  /// Modified messages are sent in response to a Modify Order to indicate that the order has been successfully modified.
37  struct ONIXS_CBOE_CFE_BOE_API MutableOrderModified : public OutgoingMessage
38  {
39  /// The time the event occurred in the CFE Matching Engine (not the time the message was sent).
41  {
42  return transactionTime_;
43  }
44 
45  /// The time the event occurred in the CFE Matching Engine (not the time the message was sent).
47  {
48  transactionTime_ = value;
49  }
50 
51  /// Echoed back from the TPH message
52  StrRef clOrdId() const
53  {
54  return clOrdId_;
55  }
56 
57  /// Echoed back from the TPH message
58  void clOrdId(StrRef value)
59  {
60  clOrdId_ = value;
61  }
62 
63  /// The ClOrdId of the original order.
65  {
66  return origClOrdId_;
67  }
68 
69  /// The ClOrdId of the original order.
70  void origClOrdId(StrRef value)
71  {
72  origClOrdId_ = value;
73  }
74 
75  /// Order identifier supplied by CFE.
76  Binary8 orderId() const
77  {
78  return orderId_;
79  }
80 
81  /// Order identifier supplied by CFE.
82  void orderId(Binary8 value)
83  {
84  orderId_ = value;
85  }
86 
87  /// Echoed back from the TPH message
89  {
90  return clearingFirm_;
91  }
92 
93  /// Echoed back from the TPH message
94  void clearingFirm(StrRef value)
95  {
96  clearingFirm_ = value;
97  }
98 
99  /// Echoed back from the TPH message
101  {
102  return price_;
103  }
104 
105  /// Echoed back from the TPH message
106  void price(BinaryPrice value)
107  {
108  price_ = value;
109  }
110 
111  /// Echoed back from the TPH message
113  {
114  return ordType_;
115  }
116 
117  /// Echoed back from the TPH message
118  void ordType(OrdType::Enum value)
119  {
120  ordType_ = value;
121  }
122 
123  /// Echoed back from the TPH message
125  {
126  return orderQty_;
127  }
128 
129  /// Echoed back from the TPH message
130  void orderQty(Binary4 value)
131  {
132  orderQty_ = value;
133  }
134 
135  /// Quantity still open for further execution. If zero, the order is complete.
137  {
138  return leavesQty_;
139  }
140 
141  /// Quantity still open for further execution. If zero, the order is complete.
142  void leavesQty(Binary4 value)
143  {
144  leavesQty_ = value;
145  }
146 
147  /// Indicates whether the trade added or removed liquidity.
149  {
150  return baseLiquidityIndicator_;
151  }
152 
153  /// Indicates whether the trade added or removed liquidity.
155  {
156  baseLiquidityIndicator_ = value;
157  }
158 
159  /// Echoed back from the TPH message
161  {
162  return stopPx_;
163  }
164 
165  /// Echoed back from the TPH message
166  void stopPx(BinaryPrice value)
167  {
168  stopPx_ = value;
169  }
170 
171  /// Echoed back from the TPH message
173  {
174  return frequentTraderId_;
175  }
176 
177  /// Echoed back from the TPH message
179  {
180  frequentTraderId_ = value;
181  }
182 
183  /// Echoed back from the TPH message
185  {
186  return custOrderHandlingInst_;
187  }
188 
189  /// Echoed back from the TPH message
191  {
192  custOrderHandlingInst_ = value;
193  }
194 
195  /// The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inbound message being acknowledged.
197  {
198  return requestReceivedTime_;
199  }
200 
201  /// The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inbound message being acknowledged.
203  {
204  requestReceivedTime_ = value;
205  }
206 
207  /// Returns message type
208  MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE { return MessageType::OrderModified; };
209 
210  /// Validates message data
211  /// Throws std::invalid_argument exception if message content is invalid.
212  void validate() const ONIXS_BATS_BOE_OVERRIDE;
213 
214  /// Returns the text representation
215  std::string toString() const ONIXS_BATS_BOE_OVERRIDE;
216 
217  /// The text representation
218  void toString(std::string& str) const ONIXS_BATS_BOE_OVERRIDE;
219 
220  private:
221  size_t serializeTo(unsigned char*) const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE;
222 
223  DateTime transactionTime_;
224  Text<20> clOrdId_;
225  Text<20> origClOrdId_;
226  Binary8 orderId_;
227  Alpha<4> clearingFirm_;
228  BinaryPrice price_;
229  OrdType::Enum ordType_;
230  Binary4 orderQty_;
231  Binary4 leavesQty_;
232  BaseLiquidityIndicator::Enum baseLiquidityIndicator_;
233  BinaryPrice stopPx_;
234  Alphanumeric<6> frequentTraderId_;
235  CustOrderHandlingInst::Enum custOrderHandlingInst_;
236  DateTime requestReceivedTime_;
237  };
238 
239  /// Serializes object into string.
240  ONIXS_CBOE_CFE_BOE_API void toStr(std::string&, const MutableOrderModified&);
241 
242  /// Serializes object into string.
243  inline std::string toStr(const MutableOrderModified& msg)
244  {
245  std::string str;
246  toStr(str, msg);
247  return str;
248  }
249 
250 }
251 }
252 }
253 }
254 }
OrdType::Enum ordType() const
Echoed back from the TPH message.
void baseLiquidityIndicator(BaseLiquidityIndicator::Enum value)
Indicates whether the trade added or removed liquidity.
BinaryPrice stopPx() const
Echoed back from the TPH message.
void price(BinaryPrice value)
Echoed back from the TPH message.
void origClOrdId(StrRef value)
The ClOrdId of the original order.
void ordType(OrdType::Enum value)
Echoed back from the TPH message.
StrRef origClOrdId() const
The ClOrdId of the original order.
Provides efficient way of accessing text-based field values.
Definition: String.h:45
void custOrderHandlingInst(CustOrderHandlingInst::Enum value)
Echoed back from the TPH message.
StrRef clearingFirm() const
Echoed back from the TPH message.
void requestReceivedTime(DateTime value)
The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inb...
MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE
Returns message type.
void leavesQty(Binary4 value)
Quantity still open for further execution. If zero, the order is complete.
void orderId(Binary8 value)
Order identifier supplied by CFE.
StrRef frequentTraderId() const
Echoed back from the TPH message.
StrRef clOrdId() const
Echoed back from the TPH message.
Binary4 orderQty() const
Echoed back from the TPH message.
void stopPx(BinaryPrice value)
Echoed back from the TPH message.
void clOrdId(StrRef value)
Echoed back from the TPH message.
void frequentTraderId(StrRef value)
Echoed back from the TPH message.
Binary8 orderId() const
Order identifier supplied by CFE.
void transactionTime(DateTime value)
The time the event occurred in the CFE Matching Engine (not the time the message was sent)...
void orderQty(Binary4 value)
Echoed back from the TPH message.
DateTime transactionTime() const
The time the event occurred in the CFE Matching Engine (not the time the message was sent)...
Modified messages are sent in response to a Modify Order to indicate that the order has been successf...
CustOrderHandlingInst::Enum custOrderHandlingInst() const
Echoed back from the TPH message.
Base class for outgoing messages.
ONIXS_CBOE_CFE_BOE_API void toStr(std::string &, const ConstantNewOrderV2 &)
Serializes object into string.
DateTime requestReceivedTime() const
The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inb...
BaseLiquidityIndicator::Enum baseLiquidityIndicator() const
Indicates whether the trade added or removed liquidity.
Binary4 leavesQty() const
Quantity still open for further execution. If zero, the order is complete.
BinaryPrice price() const
Echoed back from the TPH message.
void clearingFirm(StrRef value)
Echoed back from the TPH message.