OnixS C++ SGX Titan OUCH Trading Handler  1.2.0
API documentation
Enumerations.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 <string>
23 
25 
27 
28 
29  /// OutboundMessageTypes
31  {
32  /// Integral type used as basement for constants.
33  typedef UInt8 Base;
34 
35  enum Enum
36  {
37  /// Enter Order
38  EnterOrder = 'O',
39 
40  /// Replace Order
41  ReplaceOrder = 'U',
42 
43  /// Cancel Order
44  CancelOrder = 'X',
45 
46  /// Cancel by Order ID
48 
49  };
50  };
51 
52  /// Appends string presentation of object.
53  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, OutboundMessageTypes::Enum);
54 
55  /// Returns string presentation of object.
56  inline std::string toStr(OutboundMessageTypes::Enum value)
57  {
58  std::string str;
59  toStr(str, value);
60  return str;
61  }
62 
63  /// InboundMessageTypes
65  {
66  /// Integral type used as basement for constants.
67  typedef UInt8 Base;
68 
69  enum Enum
70  {
71  /// Order Accepted
73 
74  /// Order Rejected
76 
77  /// Order Replaced
79 
80  /// Order Cancelled
82 
83  /// Order Executed
85 
86  };
87  };
88 
89  /// Appends string presentation of object.
90  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, InboundMessageTypes::Enum);
91 
92  /// Returns string presentation of object.
93  inline std::string toStr(InboundMessageTypes::Enum value)
94  {
95  std::string str;
96  toStr(str, value);
97  return str;
98  }
99 
100  /// Side
101  struct Side
102  {
103  /// Integral type used as basement for constants.
104  typedef UInt8 Base;
105 
106  enum Enum
107  {
108  /// Buy Order
109  Buy = 'B',
110 
111  /// Sell Order
112  Sell = 'S',
113 
114  /// Short sell (not in use)
115  ShortSell = 'T',
116 
117  };
118  };
119 
120  /// Appends string presentation of object.
121  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, Side::Enum);
122 
123  /// Returns string presentation of object.
124  inline std::string toStr(Side::Enum value)
125  {
126  std::string str;
127  toStr(str, value);
128  return str;
129  }
130 
131  /// EnterOrderOpenClose
133  {
134  /// Integral type used as basement for constants.
135  typedef Int8 Base;
136 
137  enum Enum
138  {
139  /// Default for the account
140  Default = 0,
141 
142  /// Open
143  Open = 1,
144 
145  /// Close/Net
146  Close = 2,
147 
148  /// Mandatory close
149  MandatoryClose = 3,
150 
151  };
152  };
153 
154  /// Appends string presentation of object.
155  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, EnterOrderOpenClose::Enum);
156 
157  /// Returns string presentation of object.
158  inline std::string toStr(EnterOrderOpenClose::Enum value)
159  {
160  std::string str;
161  toStr(str, value);
162  return str;
163  }
164 
165  /// ReplaceOrderOpenClose
167  {
168  /// Integral type used as basement for constants.
169  typedef Int8 Base;
170 
171  enum Enum
172  {
173  /// No change
174  NoChange = 0,
175 
176  /// Open
177  Open = 1,
178 
179  /// Close/Net
180  Close = 2,
181 
182  /// Mandatory close
183  MandatoryClose = 3,
184 
185  /// Default for the account
186  Default = 4,
187 
188  };
189  };
190 
191  /// Appends string presentation of object.
192  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, ReplaceOrderOpenClose::Enum);
193 
194  /// Returns string presentation of object.
195  inline std::string toStr(ReplaceOrderOpenClose::Enum value)
196  {
197  std::string str;
198  toStr(str, value);
199  return str;
200  }
201 
202  /// TimeInForce
203  struct TimeInForce
204  {
205  /// Integral type used as basement for constants.
206  typedef Int8 Base;
207 
208  enum Enum
209  {
210  /// Day
211  Day = 0,
212 
213  /// FAK
214  ImmediateOrCancel = 3,
215 
216  ///
217  FillOrKill = 4,
218 
219  };
220  };
221 
222  /// Appends string presentation of object.
223  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, TimeInForce::Enum);
224 
225  /// Returns string presentation of object.
226  inline std::string toStr(TimeInForce::Enum value)
227  {
228  std::string str;
229  toStr(str, value);
230  return str;
231  }
232 
233  /// OrderState
234  struct OrderState
235  {
236  /// Integral type used as basement for constants.
237  typedef Int8 Base;
238 
239  enum Enum
240  {
241  /// On book
242  OnBbook = 1,
243 
244  /// Not on book
245  NotOnBook = 2,
246 
247  /// Inactive (due to price limit constraints)
248  Inactive = 3,
249 
250  /// OUCH order ownership lost
251  Lost = 99,
252 
253  };
254  };
255 
256  /// Appends string presentation of object.
257  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, OrderState::Enum);
258 
259  /// Returns string presentation of object.
260  inline std::string toStr(OrderState::Enum value)
261  {
262  std::string str;
263  toStr(str, value);
264  return str;
265  }
266 
267  /// CancellationReason
269  {
270  /// Integral type used as basement for constants.
271  typedef Int8 Base;
272 
273  enum Enum
274  {
275  /// Cancelled by user
276  ByUser = 1,
277 
278  /// Order inactivated
279  Inactivated = 4,
280 
281  /// Cancelled by system
282  BySystem = 9,
283 
284  /// Cancelled by proxy
285  ByProxy = 10,
286 
287  /// Cancelled due to Price Limit change
288  PriceLimit = 15,
289 
290  /// Order removed or changed by remove day or date
291  /// orders flag
292  DateFlagRemoval = 19,
293 
294  /// Inactivated due to ISS change
295  IssChange = 21,
296 
297  /// Cancelled during Auction
298  Auction = 34,
299 
300  /// Order deleted because trader is not allowed to
301  /// trade with himself
302  SelfTrade = 43,
303 
304  };
305  };
306 
307  /// Appends string presentation of object.
308  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, CancellationReason::Enum);
309 
310  /// Returns string presentation of object.
311  inline std::string toStr(CancellationReason::Enum value)
312  {
313  std::string str;
314  toStr(str, value);
315  return str;
316  }
317 
318  /// OrderType
319  struct OrderType
320  {
321  /// Integral type used as basement for constants.
322  typedef UInt8 Base;
323 
324  enum Enum
325  {
326  /// Half Tick Order
327  HalfTickOrder = 'H',
328 
329  /// Limit Order
330  LimitOrder = 'Y',
331 
332  };
333  };
334 
335  /// Appends string presentation of object.
336  ONIXS_SGXTITAN_OUCH_API void toStr(std::string&, OrderType::Enum);
337 
338  /// Returns string presentation of object.
339  inline std::string toStr(OrderType::Enum value)
340  {
341  std::string str;
342  toStr(str, value);
343  return str;
344  }
345 
Int8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:206
UInt8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:33
UInt8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:67
UInt8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:104
std::string toStr(OrderType::Enum value)
Returns string presentation of object.
Definition: Enumerations.h:339
Int8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:135
Int8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:169
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_END
Definition: Bootstrap.h:31
#define ONIXS_SGXTITAN_OUCH_NAMESPACE_BEGIN
Definition: Bootstrap.h:27
Used to enter a new order into the system.
Definition: EnterOrder.h:28
UInt8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:322
Int8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:271
Int8 Base
Integral type used as basement for constants.
Definition: Enumerations.h:237
Used to modify an existing order entered via OUCH.
Definition: ReplaceOrder.h:28