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