OnixS C++ CBOE CFE Binary Order Entry (BOE) Handler  1.11.0
API documentation
ModifyOrder.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 
35  /// Modify Order
36  struct ONIXS_CBOE_CFE_BOE_API ModifyOrder : public OutgoingMessage
37  {
38  /// Unique Id chosen by the client.
39  StrRef clOrdId() const
40  {
41  return clOrdId_;
42  }
43 
44  /// Unique Id chosen by the client.
45  void clOrdId(StrRef value)
46  {
47  clOrdId_ = value;
48  }
49 
50  /// The ClOrdId of the original order.
52  {
53  return origClOrdId_;
54  }
55 
56  /// The ClOrdId of the original order.
57  void origClOrdId(StrRef value)
58  {
59  origClOrdId_ = value;
60  }
61 
62  /// EFID that will clear the trade.
64  {
65  return clearingFirm_;
66  }
67 
68  /// EFID that will clear the trade.
69  void clearingFirm(StrRef value)
70  {
71  clearingFirm_ = value;
72  }
73 
74  /// Order quantity.
75  Binary4 orderQty() const
76  {
77  return orderQty_;
78  }
79 
80  /// Order quantity.
81  void orderQty(Binary4 value)
82  {
83  orderQty_ = value;
84  }
85 
86  /// Limit price.
88  {
89  return price_;
90  }
91 
92  /// Limit price.
93  void price(BinaryPrice value)
94  {
95  price_ = value;
96  }
97 
98  /// Order type.
100  {
101  return ordType_;
102  }
103 
104  /// Order type.
105  void ordType(OrdType::Enum value)
106  {
107  ordType_ = value;
108  }
109 
110  /// CancelOrigOnReject.
112  {
113  return cancelOrigOnReject_;
114  }
115 
116  /// CancelOrigOnReject.
118  {
119  cancelOrigOnReject_ = value;
120  }
121 
122  /// Stop price.
124  {
125  return stopPx_;
126  }
127 
128  /// Stop price.
129  void stopPx(BinaryPrice value)
130  {
131  stopPx_ = value;
132  }
133 
134  /// Manual order indicator.
136  {
137  return manualOrderIndicator_;
138  }
139 
140  /// Manual order indicator.
142  {
143  manualOrderIndicator_ = value;
144  }
145 
146  /// Identifies the Order Entry Operator responsible for this message.
147  StrRef oEOID() const
148  {
149  return oEOID_;
150  }
151 
152  /// Identifies the Order Entry Operator responsible for this message.
153  void oEOID(StrRef value)
154  {
155  oEOID_ = value;
156  }
157 
158  /// Supplemental customer identifier used for billing related programs.
160  {
161  return frequentTraderId_;
162  }
163 
164  /// Supplemental customer identifier used for billing related programs.
166  {
167  frequentTraderId_ = value;
168  }
169 
170  /// Execution source code provided during order entry to describe broker service.
172  {
173  return custOrderHandlingInst_;
174  }
175 
176  /// Execution source code provided during order entry to describe broker service.
178  {
179  custOrderHandlingInst_ = value;
180  }
181 
182  /// Returns message type
183  MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE { return MessageType::ModifyOrder; };
184 
185  /// Validates message data
186  /// Throws std::invalid_argument exception if message content is invalid.
187  void validate() const ONIXS_BATS_BOE_OVERRIDE;
188 
189  /// Returns the text representation
190  std::string toString() const ONIXS_BATS_BOE_OVERRIDE;
191 
192  /// The text representation
193  void toString(std::string& str) const ONIXS_BATS_BOE_OVERRIDE;
194 
195  private:
196  size_t serializeTo(unsigned char*) const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE;
197 
198  Text<20> clOrdId_;
199  Text<20> origClOrdId_;
200  Alpha<4> clearingFirm_;
201  Binary4 orderQty_;
202  BinaryPrice price_;
203  OrdType::Enum ordType_;
204  CancelOrigOnReject::Enum cancelOrigOnReject_;
205  BinaryPrice stopPx_;
206  ManualOrderIndicator::Enum manualOrderIndicator_;
207  Text<18> oEOID_;
208  Alphanumeric<6> frequentTraderId_;
209  CustOrderHandlingInst::Enum custOrderHandlingInst_;
210  };
211 
212  /// Serializes object into string.
213  ONIXS_CBOE_CFE_BOE_API void toStr(std::string&, const ModifyOrder&);
214 
215  /// Serializes object into string.
216  inline std::string toStr(const ModifyOrder& msg)
217  {
218  std::string str;
219  toStr(str, msg);
220  return str;
221  }
222 
223 }
224 }
225 }
226 }
StrRef oEOID() const
Identifies the Order Entry Operator responsible for this message.
Definition: ModifyOrder.h:147
CustOrderHandlingInst::Enum custOrderHandlingInst() const
Execution source code provided during order entry to describe broker service.
Definition: ModifyOrder.h:171
void frequentTraderId(StrRef value)
Supplemental customer identifier used for billing related programs.
Definition: ModifyOrder.h:165
void ordType(OrdType::Enum value)
Order type.
Definition: ModifyOrder.h:105
OrdType::Enum ordType() const
Order type.
Definition: ModifyOrder.h:99
void oEOID(StrRef value)
Identifies the Order Entry Operator responsible for this message.
Definition: ModifyOrder.h:153
void clearingFirm(StrRef value)
EFID that will clear the trade.
Definition: ModifyOrder.h:69
void clOrdId(StrRef value)
Unique Id chosen by the client.
Definition: ModifyOrder.h:45
BinaryPrice stopPx() const
Stop price.
Definition: ModifyOrder.h:123
Provides efficient way of accessing text-based field values.
Definition: String.h:45
void manualOrderIndicator(ManualOrderIndicator::Enum value)
Manual order indicator.
Definition: ModifyOrder.h:141
ManualOrderIndicator::Enum manualOrderIndicator() const
Manual order indicator.
Definition: ModifyOrder.h:135
void origClOrdId(StrRef value)
The ClOrdId of the original order.
Definition: ModifyOrder.h:57
void toStr(std::string &str, const FixedPointDecimal< Mantissa, Exponent > &number)
Serializes fixed-point decimal into a string.
Definition: Decimal.h:156
void stopPx(BinaryPrice value)
Stop price.
Definition: ModifyOrder.h:129
StrRef origClOrdId() const
The ClOrdId of the original order.
Definition: ModifyOrder.h:51
StrRef frequentTraderId() const
Supplemental customer identifier used for billing related programs.
Definition: ModifyOrder.h:159
CancelOrigOnReject::Enum cancelOrigOnReject() const
CancelOrigOnReject.
Definition: ModifyOrder.h:111
StrRef clOrdId() const
Unique Id chosen by the client.
Definition: ModifyOrder.h:39
Binary4 orderQty() const
Order quantity.
Definition: ModifyOrder.h:75
Base class for outgoing messages.
MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE
Returns message type.
Definition: ModifyOrder.h:183
void cancelOrigOnReject(CancelOrigOnReject::Enum value)
CancelOrigOnReject.
Definition: ModifyOrder.h:117
void orderQty(Binary4 value)
Order quantity.
Definition: ModifyOrder.h:81
void price(BinaryPrice value)
Limit price.
Definition: ModifyOrder.h:93
void custOrderHandlingInst(CustOrderHandlingInst::Enum value)
Execution source code provided during order entry to describe broker service.
Definition: ModifyOrder.h:177
BinaryPrice price() const
Limit price.
Definition: ModifyOrder.h:87
StrRef clearingFirm() const
EFID that will clear the trade.
Definition: ModifyOrder.h:63