OnixS C++ CBOE CFE Binary Order Entry (BOE) Handler  1.11.0
API documentation
NewOrderOptionUSFutures.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  typedef Char Leg;
36 
37  /// New Order Option US Futures V1
38  struct ONIXS_CBOE_CFE_BOE_API NewOrderOptionUSFutures : public OutgoingMessage
39  {
40  /// Unique Id chosen by the client.
41  StrRef clOrdId() const
42  {
43  return clOrdId_;
44  }
45 
46  /// Unique Id chosen by the client.
47  void clOrdId(StrRef value)
48  {
49  clOrdId_ = value;
50  }
51 
52  /// Side.
53  Side::Enum side() const
54  {
55  return side_;
56  }
57 
58  /// Side.
59  void side(Side::Enum value)
60  {
61  side_ = value;
62  }
63 
64  /// Order quantity.
65  Binary4 orderQty() const
66  {
67  return orderQty_;
68  }
69 
70  /// Order quantity.
71  void orderQty(Binary4 value)
72  {
73  orderQty_ = value;
74  }
75 
76  /// EFID that will clear the trade.
78  {
79  return clearingFirm_;
80  }
81 
82  /// EFID that will clear the trade.
83  void clearingFirm(StrRef value)
84  {
85  clearingFirm_ = value;
86  }
87 
88  /// Supplemental identifier.
90  {
91  return clearingAccount_;
92  }
93 
94  /// Supplemental identifier.
95  void clearingAccount(StrRef value)
96  {
97  clearingAccount_ = value;
98  }
99 
100  /// Limit price. Four implied decimal places.
102  {
103  return price_;
104  }
105 
106  /// Limit price. Four implied decimal places.
107  void price(BinaryPrice value)
108  {
109  price_ = value;
110  }
111 
112  /// Order type.
114  {
115  return ordType_;
116  }
117 
118  /// Order type.
119  void ordType(OrdType::Enum value)
120  {
121  ordType_ = value;
122  }
123 
124  /// Time In Force.
126  {
127  return timeInForce_;
128  }
129 
130  /// Time In Force.
132  {
133  timeInForce_ = value;
134  }
135 
136  /// Symbol.
137  StrRef symbol() const
138  {
139  return symbol_;
140  }
141 
142  /// Symbol.
143  void symbol(StrRef value)
144  {
145  symbol_ = value;
146  }
147 
148  /// Security Description.
150  {
151  return securityDesc_;
152  }
153 
154  /// Security Description.
155  void securityDesc(StrRef value)
156  {
157  securityDesc_ = value;
158  }
159 
160  /// The Capacity refers to the OCC account type.
162  {
163  return capacity_;
164  }
165 
166  /// The Capacity refers to the OCC account type.
168  {
169  capacity_ = value;
170  }
171 
172  /// Unique account identifier.
173  StrRef account() const
174  {
175  return account_;
176  }
177 
178  /// Unique account identifier.
179  void account(StrRef value)
180  {
181  account_ = value;
182  }
183 
184  /// Prevent match.
186  {
187  return preventMatch_;
188  }
189 
190  /// Prevent match.
191  void preventMatch(StrRef value)
192  {
193  preventMatch_ = value;
194  }
195 
196  /// Required for TimeInForce = 6 orders, specifies the date-time (in UTC) that the order expires.
198  {
199  return expireTime_;
200  }
201 
202  /// Required for TimeInForce = 6 orders, specifies the date-time (in UTC) that the order expires.
203  void expireTime(DateTime value)
204  {
205  expireTime_ = value;
206  }
207 
208  /// Indicates status of client position in a trade resulting from the order.
210  {
211  return openClose_;
212  }
213 
214  /// Indicates status of client position in a trade resulting from the order.
216  {
217  openClose_ = value;
218  }
219 
220  /// CMTA Number of the firm that will clear the trade.
222  {
223  return cMTANumber_;
224  }
225 
226  /// CMTA Number of the firm that will clear the trade.
227  void cMTANumber(Binary4 value)
228  {
229  cMTANumber_ = value;
230  }
231 
232  /// Used to group orders for use in mass cancels where multiple orders can be cancelled by specifying a list of CustomGroupIds.
234  {
235  return customGroupId_;
236  }
237 
238  /// Used to group orders for use in mass cancels where multiple orders can be cancelled by specifying a list of CustomGroupIds.
239  void customGroupId(Binary2 value)
240  {
241  customGroupId_ = value;
242  }
243 
244  /// Cti Code.
246  {
247  return ctiCode_;
248  }
249 
250  /// Cti Code.
251  void ctiCode(CtiCode::Enum value)
252  {
253  ctiCode_ = value;
254  }
255 
256  /// Manual order indicator.
258  {
259  return manualOrderIndicator_;
260  }
261 
262  /// Manual order indicator.
264  {
265  manualOrderIndicator_ = value;
266  }
267 
268  /// Identifies the Order Entry Operator responsible for this message.
269  StrRef oEOID() const
270  {
271  return oEOID_;
272  }
273 
274  /// Identifies the Order Entry Operator responsible for this message.
275  void oEOID(StrRef value)
276  {
277  oEOID_ = value;
278  }
279 
280  /// Supplemental customer identifier used for billing related programs.
282  {
283  return frequentTraderId_;
284  }
285 
286  /// Supplemental customer identifier used for billing related programs.
288  {
289  frequentTraderId_ = value;
290  }
291 
292  /// Execution source code provided during order entry to describe broker service.
294  {
295  return custOrderHandlingInst_;
296  }
297 
298  /// Execution source code provided during order entry to describe broker service.
300  {
301  custOrderHandlingInst_ = value;
302  }
303 
304  /// Identifies the country code.
306  {
307  return countryCode_;
308  }
309 
310  /// Identifies the country code.
311  void countryCode(StrRef value)
312  {
313  countryCode_ = value;
314  }
315 
316  ///Legs.
317  const std::vector<Leg>& legs() const
318  {
319  return legs_;
320  }
321 
322  ///Legs.
323  std::vector<Leg>& legs()
324  {
325  return legs_;
326  }
327 
328  /// Returns message type
329  MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE { return MessageType::NewOrderOptionUSFutures; };
330 
331  /// Validates message data
332  /// Throws std::invalid_argument exception if message content is invalid.
333  void validate() const ONIXS_BATS_BOE_OVERRIDE;
334 
335  /// Returns the text representation
336  std::string toString() const ONIXS_BATS_BOE_OVERRIDE;
337 
338  /// The text representation
339  void toString(std::string& str) const ONIXS_BATS_BOE_OVERRIDE;
340 
341  private:
342  size_t serializeTo(unsigned char*) const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE;
343 
344  Text<20> clOrdId_;
345  Side::Enum side_;
346  Binary4 orderQty_;
347  Alpha<4> clearingFirm_;
348  Alpha<4> clearingAccount_;
349  BinaryPrice price_;
350  OrdType::Enum ordType_;
351  TimeInForce::Enum timeInForce_;
352  Alphanumeric<8> symbol_;
353  Text<16> securityDesc_;
354  Capacity::Enum capacity_;
355  Text<16> account_;
356  Text<3> preventMatch_;
357  DateTime expireTime_;
358  OpenClose::Enum openClose_;
359  Binary4 cMTANumber_;
360  Binary2 customGroupId_;
361  CtiCode::Enum ctiCode_;
362  ManualOrderIndicator::Enum manualOrderIndicator_;
363  Text<18> oEOID_;
364  Alphanumeric<6> frequentTraderId_;
365  CustOrderHandlingInst::Enum custOrderHandlingInst_;
366  Alphanumeric<2> countryCode_;
367  std::vector<Leg> legs_;
368  };
369 
370  /// Serializes object into string.
371  ONIXS_CBOE_CFE_BOE_API void toStr(std::string&, const NewOrderOptionUSFutures&);
372 
373  /// Serializes object into string.
374  inline std::string toStr(const NewOrderOptionUSFutures& msg)
375  {
376  std::string str;
377  toStr(str, msg);
378  return str;
379  }
380 
381 }
382 }
383 }
384 }
void oEOID(StrRef value)
Identifies the Order Entry Operator responsible for this message.
StrRef clOrdId() const
Unique Id chosen by the client.
StrRef account() const
Unique account identifier.
OpenClose::Enum openClose() const
Indicates status of client position in a trade resulting from the order.
CustOrderHandlingInst::Enum custOrderHandlingInst() const
Execution source code provided during order entry to describe broker service.
Provides efficient way of accessing text-based field values.
Definition: String.h:45
void capacity(Capacity::Enum value)
The Capacity refers to the OCC account type.
void account(StrRef value)
Unique account identifier.
void securityDesc(StrRef value)
Security Description.
void clearingFirm(StrRef value)
EFID that will clear the trade.
void frequentTraderId(StrRef value)
Supplemental customer identifier used for billing related programs.
void toStr(std::string &str, const FixedPointDecimal< Mantissa, Exponent > &number)
Serializes fixed-point decimal into a string.
Definition: Decimal.h:156
void countryCode(StrRef value)
Identifies the country code.
void price(BinaryPrice value)
Limit price. Four implied decimal places.
void openClose(OpenClose::Enum value)
Indicates status of client position in a trade resulting from the order.
void clearingAccount(StrRef value)
Supplemental identifier.
Capacity::Enum capacity() const
The Capacity refers to the OCC account type.
StrRef countryCode() const
Identifies the country code.
void customGroupId(Binary2 value)
Used to group orders for use in mass cancels where multiple orders can be cancelled by specifying a l...
MessageType::Enum type() const ONIXS_BATS_BOE_NOEXCEPT ONIXS_BATS_BOE_OVERRIDE
Returns message type.
TimeInForce::Enum timeInForce() const
Time In Force.
void cMTANumber(Binary4 value)
CMTA Number of the firm that will clear the trade.
void expireTime(DateTime value)
Required for TimeInForce = 6 orders, specifies the date-time (in UTC) that the order expires...
StrRef frequentTraderId() const
Supplemental customer identifier used for billing related programs.
Binary2 customGroupId() const
Used to group orders for use in mass cancels where multiple orders can be cancelled by specifying a l...
void timeInForce(TimeInForce::Enum value)
Time In Force.
BinaryPrice price() const
Limit price. Four implied decimal places.
ManualOrderIndicator::Enum manualOrderIndicator() const
Manual order indicator.
void clOrdId(StrRef value)
Unique Id chosen by the client.
StrRef clearingFirm() const
EFID that will clear the trade.
Base class for outgoing messages.
void custOrderHandlingInst(CustOrderHandlingInst::Enum value)
Execution source code provided during order entry to describe broker service.
Binary4 cMTANumber() const
CMTA Number of the firm that will clear the trade.
StrRef clearingAccount() const
Supplemental identifier.
DateTime expireTime() const
Required for TimeInForce = 6 orders, specifies the date-time (in UTC) that the order expires...
char Char
Character type alias.
Definition: String.h:42
void manualOrderIndicator(ManualOrderIndicator::Enum value)
Manual order indicator.
StrRef oEOID() const
Identifies the Order Entry Operator responsible for this message.