OnixS C++ CBOE CFE Binary Order Entry (BOE) Handler  1.11.0
API documentation
MutableOrderAcknowledgement.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  /// Order Acknowledgement messages are sent in response to a New Order message.
37  struct ONIXS_CBOE_CFE_BOE_API MutableOrderAcknowledgement : 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  /// Order identifier supplied by CFE.
64  Binary8 orderId() const
65  {
66  return orderId_;
67  }
68 
69  /// Order identifier supplied by CFE.
70  void orderId(Binary8 value)
71  {
72  orderId_ = value;
73  }
74 
75  /// Echoed back from the TPH message
76  StrRef side() const
77  {
78  return side_;
79  }
80 
81  /// Echoed back from the TPH message
82  void side(StrRef value)
83  {
84  side_ = value;
85  }
86 
87  /// Echoed back from the TPH message
89  {
90  return price_;
91  }
92 
93  /// Echoed back from the TPH message
94  void price(BinaryPrice value)
95  {
96  price_ = value;
97  }
98 
99  /// Echoed back from the TPH message
101  {
102  return ordType_;
103  }
104 
105  /// Echoed back from the TPH message
106  void ordType(OrdType::Enum value)
107  {
108  ordType_ = value;
109  }
110 
111  /// Echoed back from the TPH message
113  {
114  return timeInForce_;
115  }
116 
117  /// Echoed back from the TPH message
119  {
120  timeInForce_ = value;
121  }
122 
123  /// Echoed back from the TPH message
124  Binary4 minQty() const
125  {
126  return minQty_;
127  }
128 
129  /// Echoed back from the TPH message
130  void minQty(Binary4 value)
131  {
132  minQty_ = value;
133  }
134 
135  /// Echoed back from the TPH message
136  StrRef symbol() const
137  {
138  return symbol_;
139  }
140 
141  /// Echoed back from the TPH message
142  void symbol(StrRef value)
143  {
144  symbol_ = value;
145  }
146 
147  /// Echoed back from the TPH message
149  {
150  return capacity_;
151  }
152 
153  /// Echoed back from the TPH message
155  {
156  capacity_ = value;
157  }
158 
159  /// Echoed back from the TPH message
160  StrRef account() const
161  {
162  return account_;
163  }
164 
165  /// Echoed back from the TPH message
166  void account(StrRef value)
167  {
168  account_ = value;
169  }
170 
171  /// Echoed back from the TPH message
173  {
174  return clearingFirm_;
175  }
176 
177  /// Echoed back from the TPH message
178  void clearingFirm(StrRef value)
179  {
180  clearingFirm_ = value;
181  }
182 
183  /// Echoed back from the TPH message
185  {
186  return clearingAccount_;
187  }
188 
189  /// Echoed back from the TPH message
191  {
192  clearingAccount_ = value;
193  }
194 
195  /// Echoed back from the TPH message
197  {
198  return orderQty_;
199  }
200 
201  /// Echoed back from the TPH message
202  void orderQty(Binary4 value)
203  {
204  orderQty_ = value;
205  }
206 
207  /// Echoed back from the TPH message
209  {
210  return preventMatch_;
211  }
212 
213  /// Echoed back from the TPH message
214  void preventMatch(StrRef value)
215  {
216  preventMatch_ = value;
217  }
218 
219  /// Echoed back from the TPH message
221  {
222  return maturityDate_;
223  }
224 
225  /// Echoed back from the TPH message
226  void maturityDate(Date value)
227  {
228  maturityDate_ = value;
229  }
230 
231  /// Echoed back from the TPH message
233  {
234  return openClose_;
235  }
236 
237  /// Echoed back from the TPH message
239  {
240  openClose_ = value;
241  }
242 
243  /// Quantity still open for further execution. If zero, the order is complete.
245  {
246  return leavesQty_;
247  }
248 
249  /// Quantity still open for further execution. If zero, the order is complete.
250  void leavesQty(Binary4 value)
251  {
252  leavesQty_ = value;
253  }
254 
255  /// Indicates whether the trade added or removed liquidity.
257  {
258  return baseLiquidityIndicator_;
259  }
260 
261  /// Indicates whether the trade added or removed liquidity.
263  {
264  baseLiquidityIndicator_ = value;
265  }
266 
267  /// Echoed back from the TPH message
269  {
270  return expireTime_;
271  }
272 
273  /// Echoed back from the TPH message
274  void expireTime(DateTime value)
275  {
276  expireTime_ = value;
277  }
278 
279  /// Additional information about the liquidity of an order.
281  {
282  return subLiquidityIndicator_;
283  }
284 
285  /// Additional information about the liquidity of an order.
287  {
288  subLiquidityIndicator_ = value;
289  }
290 
291  /// Echoed back from the TPH message
293  {
294  return stopPx_;
295  }
296 
297  /// Echoed back from the TPH message
298  void stopPx(BinaryPrice value)
299  {
300  stopPx_ = value;
301  }
302 
303  /// Echoed back from the TPH message
305  {
306  return cMTANumber_;
307  }
308 
309  /// Echoed back from the TPH message
310  void cMTANumber(Binary4 value)
311  {
312  cMTANumber_ = value;
313  }
314 
315  /// Echoed back from the TPH message
317  {
318  return ctiCode_;
319  }
320 
321  /// Echoed back from the TPH message
322  void ctiCode(CtiCode::Enum value)
323  {
324  ctiCode_ = value;
325  }
326 
327  /// Echoed back from the TPH message
329  {
330  return manualOrderIndicator_;
331  }
332 
333  /// Echoed back from the TPH message
335  {
336  manualOrderIndicator_ = value;
337  }
338 
339  /// Echoed back from the TPH message
340  StrRef oEOID() const
341  {
342  return oEOID_;
343  }
344 
345  /// Echoed back from the TPH message
346  void oEOID(StrRef value)
347  {
348  oEOID_ = value;
349  }
350 
351  /// Echoed back from the TPH message
352  Binary4 cumQty() const
353  {
354  return cumQty_;
355  }
356 
357  /// Echoed back from the TPH message
358  void cumQty(Binary4 value)
359  {
360  cumQty_ = value;
361  }
362 
363  /// Echoed back from the TPH message
365  {
366  return frequentTraderId_;
367  }
368 
369  /// Echoed back from the TPH message
371  {
372  frequentTraderId_ = value;
373  }
374 
375  /// Echoed back from the TPH message
377  {
378  return custOrderHandlingInst_;
379  }
380 
381  /// Echoed back from the TPH message
383  {
384  custOrderHandlingInst_ = value;
385  }
386 
387  /// The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inbound message being acknowledged.
389  {
390  return requestReceivedTime_;
391  }
392 
393  /// The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inbound message being acknowledged.
395  {
396  requestReceivedTime_ = value;
397  }
398 
399  /// Returns message type
400  MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE { return MessageType::OrderAcknowledgement; };
401 
402  /// Validates message data
403  /// Throws std::invalid_argument exception if message content is invalid.
404  void validate() const ONIXS_BATS_BOE_OVERRIDE;
405 
406  /// Returns the text representation
407  std::string toString() const ONIXS_BATS_BOE_OVERRIDE;
408 
409  /// The text representation
410  void toString(std::string& str) const ONIXS_BATS_BOE_OVERRIDE;
411 
412  private:
413  size_t serializeTo(unsigned char*) const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE;
414 
415  DateTime transactionTime_;
416  Text<20> clOrdId_;
417  Binary8 orderId_;
418  Text<1> side_;
419  BinaryPrice price_;
420  OrdType::Enum ordType_;
421  TimeInForce::Enum timeInForce_;
422  Binary4 minQty_;
423  Alphanumeric<8> symbol_;
424  Capacity::Enum capacity_;
425  Text<16> account_;
426  Alpha<4> clearingFirm_;
427  Alpha<4> clearingAccount_;
428  Binary4 orderQty_;
429  Alpha<3> preventMatch_;
430  Date maturityDate_;
431  OpenClose::Enum openClose_;
432  Binary4 leavesQty_;
433  BaseLiquidityIndicator::Enum baseLiquidityIndicator_;
434  DateTime expireTime_;
435  SubLiquidityIndicator::Enum subLiquidityIndicator_;
436  BinaryPrice stopPx_;
437  Binary4 cMTANumber_;
438  CtiCode::Enum ctiCode_;
439  ManualOrderIndicator::Enum manualOrderIndicator_;
440  Text<18> oEOID_;
441  Binary4 cumQty_;
442  Alphanumeric<6> frequentTraderId_;
443  CustOrderHandlingInst::Enum custOrderHandlingInst_;
444  DateTime requestReceivedTime_;
445  };
446 
447  /// Serializes object into string.
448  ONIXS_CBOE_CFE_BOE_API void toStr(std::string&, const MutableOrderAcknowledgement&);
449 
450  /// Serializes object into string.
451  inline std::string toStr(const MutableOrderAcknowledgement& msg)
452  {
453  std::string str;
454  toStr(str, msg);
455  return str;
456  }
457 
458 }
459 }
460 }
461 }
462 }
TimeInForce::Enum timeInForce() const
Echoed back from the TPH message.
DateTime expireTime() const
Echoed back from the TPH message.
void leavesQty(Binary4 value)
Quantity still open for further execution. If zero, the order is complete.
void custOrderHandlingInst(CustOrderHandlingInst::Enum value)
Echoed back from the TPH message.
Provides efficient way of accessing text-based field values.
Definition: String.h:45
void subLiquidityIndicator(SubLiquidityIndicator::Enum value)
Additional information about the liquidity of an order.
void frequentTraderId(StrRef value)
Echoed back from the TPH message.
CustOrderHandlingInst::Enum custOrderHandlingInst() const
Echoed back from the TPH message.
void price(BinaryPrice value)
Echoed back from the TPH message.
Capacity::Enum capacity() const
Echoed back from the TPH message.
Binary4 leavesQty() const
Quantity still open for further execution. If zero, the order is complete.
DateTime requestReceivedTime() const
The earliest timestamp, populated with nanosecond precision, recorded by CFE of the corresponding inb...
StrRef frequentTraderId() const
Echoed back from the TPH message.
void cMTANumber(Binary4 value)
Echoed back from the TPH message.
void baseLiquidityIndicator(BaseLiquidityIndicator::Enum value)
Indicates whether the trade added or removed liquidity.
void account(StrRef value)
Echoed back from the TPH message.
BinaryPrice price() const
Echoed back from the TPH message.
void clOrdId(StrRef value)
Echoed back from the TPH message.
void ordType(OrdType::Enum value)
Echoed back from the TPH message.
void transactionTime(DateTime value)
The time the event occurred in the CFE Matching Engine (not the time the message was sent)...
SubLiquidityIndicator::Enum subLiquidityIndicator() const
Additional information about the liquidity of an order.
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 preventMatch(StrRef 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)...
void cumQty(Binary4 value)
Echoed back from the TPH message.
ManualOrderIndicator::Enum manualOrderIndicator() const
Echoed back from the TPH message.
OpenClose::Enum openClose() const
Echoed back from the TPH message.
CtiCode::Enum ctiCode() const
Echoed back from the TPH message.
void timeInForce(TimeInForce::Enum value)
Echoed back from the TPH message.
Order Acknowledgement messages are sent in response to a New Order message.
void expireTime(DateTime value)
Echoed back from the TPH message.
void minQty(Binary4 value)
Echoed back from the TPH message.
void manualOrderIndicator(ManualOrderIndicator::Enum value)
Echoed back from the TPH message.
BinaryPrice stopPx() const
Echoed back from the TPH message.
Base class for outgoing messages.
void orderId(Binary8 value)
Order identifier supplied by CFE.
void stopPx(BinaryPrice value)
Echoed back from the TPH message.
ONIXS_CBOE_CFE_BOE_API void toStr(std::string &, const ConstantNewOrderV2 &)
Serializes object into string.
void clearingFirm(StrRef value)
Echoed back from the TPH message.
BaseLiquidityIndicator::Enum baseLiquidityIndicator() const
Indicates whether the trade added or removed liquidity.
void capacity(Capacity::Enum value)
Echoed back from the TPH message.
void openClose(OpenClose::Enum value)
Echoed back from the TPH message.
OrdType::Enum ordType() const
Echoed back from the TPH message.
void clearingAccount(StrRef value)
Echoed back from the TPH message.
void orderQty(Binary4 value)
Echoed back from the TPH message.
void ctiCode(CtiCode::Enum value)
Echoed back from the TPH message.