OnixS C++ CME iLink 3 Binary Order Entry Handler  1.18.9
API Documentation
ValuesEnums.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*
4 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
5 *
6 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
7 * and international copyright treaties.
8 *
9 * Access to and use of the software is governed by the terms of the applicable OnixS Software
10 * Services Agreement (the Agreement) and Customer end user license agreements granting
11 * a non-assignable, non-transferable and non-exclusive license to use the software
12 * for it's own data processing purposes under the terms defined in the Agreement.
13 *
14 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
15 * of this source code or associated reference material to any other location for further reproduction
16 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
17 *
18 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
19 * the terms of the Agreement is a violation of copyright law.
20 */
21 
22 #include <string>
23 
24 #include <OnixS/CME/iLink3/ABI.h>
25 
26 namespace OnixS
27 {
28 namespace CME
29 {
30 namespace iLink3
31 {
32 
33 template <typename ErrorCodesType>
34 typename ErrorCodesType::Enum valueToErrorCode(unsigned short value) ONIXS_ILINK3_NOTHROW
35 {
36  return value < ErrorCodesType::NotSet ? static_cast<typename ErrorCodesType::Enum>(value) : ErrorCodesType::NotSet;
37 }
38 
39 /**
40 * Code to identify reason for a <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/iLink+3+Business+Reject">Business Message Reject</a> message.
41 */
43 {
44  enum Enum
45  {
46  /// The value is not set.
47  NotSet = 255,
48 
49  /// Other
50  Other = 0,
51 
52  /// Unknown ID (unknown PartyDetailsListReqID being referenced in business message)
53  UnknownId = 1,
54 
55  /// Unknown Security
57 
58  /// Unsupported Message Type (for example using messages specific to cash markets for futures)
60 
61  /// Required Field Missing
63 
64  /// Not Authorized
66 
67  /// Throttle Limit Exceeded (volume controls)
69 
70  /// Value is incorrect(out of range) for this tag (for example using a value outside defined range of integer)
72 
73  /// Incorrect data format for value (for example using ASCII character outside 32 - 126 in string field)
75 
76  /// Rejected due to Kill Switch
78 
79  /// Rejected due to Risk Management API
81 
82  /// Rejected due to Globex Credit Controls
84 
85  /// Not Authorized to trade Deliverable Swap Futures
87 
88  /// Not Authorized to trade Interest Rate Swap Futures
90 
91  /// Rejected due to Inline Credit Controls
93 
94  /// Invalid PartyDetailsListReqID(reusing already existing PartyDetailsListReqID while creating Party Details Definition Request)
96 
97  /// Incoming message could not be decoded
99 
100  /// Same repeating group entry appears more than once
102 
103  /// Exceeded maximum number of allowable Party Details Definition Requests
105 
106  /// Technical Error in Registering Party Details
108 
109  /// Rejected due to Cross Venue Risk
111 
112  /// Order Status Not Available
114 
115  /// Enum Not Supported
117 
118  /// Order Status Not Found
120 
121  /// Mass Order Status Cannot be Completed
123 
124  /// Exceeded Maximum Number of Allowable RequestingPartyID's in Party Details List Request
126 
127  /// Duplicate Order Threshold Exceeded
129 
130  /// On - Demand Message Rejected Due to Preceding Party Details Definition Request Being Rejected
132 
133  /// Message Rejected Since PartyDetailsListReqID Does Not Match with Immediately Preceding Party Details Definition Request sent to MSGW when using On - demand administrative information
135 
136  /// Party Details Definition Request sent to MSGW Being Rejected Due to Corresponding Business Message Being Rejected
138 
139  /// Another Message Sent in Between Party Details Definition Request and Business Message when using On - demand administrative information
141 
142  /// Cannot Have More Than One In - Flight Mass Order Status Request in Progress
144 
145  /// Exceeded Maximum Number of In - Flight Order Status Requests
147 
148  /// Cannot Have More Than One In - Flight Party Details List Request in Progress
150 
151  /// Party Details List Request is Missing Requesting Party ID and Party ID
153 
154  /// Party Details List Request cannot contain both RequestingPartyID and PartyID
156 
157  /// Party Details Definition Request Being Rejected Since Another Message was sent in Between On - Demand Message
159 
160  /// Buy Side Firm ID Does Not Match Sell Side Firm ID in New Order Cross
162 
163  /// Message Type Not Supported on Backup Instance
165 
166  /// New Order Cross Does Not Contain Buy Side Followed by Sell Side
168  };
169 
170  ONIXS_ILINK3_EXPORTED static const char* toString(Enum type) ONIXS_ILINK3_NOTHROW;
171 
172  ONIXS_ILINK3_EXPORTED static const char* toString(unsigned short value) ONIXS_ILINK3_NOTHROW;
173 
174  static BusinessRejectReason::Enum toRejectReason(unsigned short value) ONIXS_ILINK3_NOTHROW
175  {
176  return valueToErrorCode<BusinessRejectReason>(value);
177  }
178 };
179 
180 /**
181  * The <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/Terminate">Terminate</a> message error codes.
182  */
184 {
185  enum Enum
186  {
187  NotSet = 255, ///< The value is not set
188  Finished = 0, ///< session is being terminated without finalization
189  Unnegotiated = 2, ///< Sending any message when session has not been Negotiated
190  NotEstablished = 3, ///< Sending any message (except Negotiate) when session has not been established
191  AlreadyNegotiated = 4, ///< NegotiationResponse was already sent; Negotiate was redundant
192  NegotiationInProgress = 5, ///< Previous Negotiate still being processed; Wait for NegotiationResponse or timeout
193  AlreadyEstablished = 6, ///< EstablishmentAck was already sent; Establish was redundant
194  EstablishInProgress = 7, ///< Previous Establish still being processed; Wait for EstablishmentAck or timeout
195  CMEAdministeredPortClosure = 8, ///< due to invalid number of Negotiate: Establish attempts being exceeded
196  VolumeControls = 9, ///< exceeding TPS limit as defined for volume controls (logout action)
197  InvalidNextSeqNo = 10, ///< value is not greater than the one last used for same UUID or value sent by the client is out of acceptable range (MIN, MAX)
198  InvalidMsgSeqNo = 11, ///< value is lower than the last one used for the same UUID or value is not initialized to 1 at the beginning of the week or value sent by the client is out of acceptable range (MIN, MAX)
199  InvalidLastSeqNo = 12, ///< value is lower than the last one used for the same UUID or value sent by the client is out of acceptable range (MIN, MAX)
200  InvalidUUID = 13, ///< UUID value does not match current UUID or value sent by the client is out of acceptable range (MIN, MAX)
201  InvalidTimestamp = 14, ///< Timestamp value does not match with RequestTimestamp sent by CME or value sent by the client is out of acceptable range (MIN, MAX)
202  RequiredUUIDMisssing = 15, ///< null value in UUID field
203  RequiredRequestTimestampMissing = 16, ///< null value in RequestTimestamp field
204  RequiredCodeMisssing = 17, ///< null value in Code field
205  InvalidSOFH = 18, ///< Invalid message length or invalid encoding type specified
206  DecodingError = 19, ///< Incoming message could not be decoded
207  KeepAliveIntervalLapsed = 20, ///< KeepAliveInterval has lapsed without any response so terminating session
208  RequiredNextSeqNoMissing = 21, ///< null value in NextSeqNo field
209  RequiredKeepAliveIntervalLapsedMissing = 22, ///< null value in KeepAliveIntervalLapsed field
210  NonNegotiate = 23, ///< Establish message received when not Negotiated: Established
211  TerminateInProgress = 24, ///< Previous Terminate still being processed; Wait for Terminate or timeout
212  Other = 25, ///< any other error condition not mentioned above
213  DisconnectFromPrimary = 26, ///< Backup session will be terminated as well
214  };
215 
216  /// \return a string that represents the given value.
217  ONIXS_ILINK3_EXPORTED static const char* toString(Enum value) ONIXS_ILINK3_NOTHROW;
218 
219  /// \return The TerminateErrorCode::Enum value that corresponds to the given integer value.
220  static TerminateErrorCode::Enum toErrorCode(unsigned short value) ONIXS_ILINK3_NOTHROW
221  {
222  return valueToErrorCode<TerminateErrorCode>(value);
223  }
224 };
225 
226 /**
227 * The <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/Negotiation+Reject">Negotiation Reject</a> message error codes.
228 */
230 {
231  enum Enum
232  {
233  NotSet = 255, ///< The value is not set
234  HMACNotAuthenticated = 0, ///< failed authentication because identity is not recognized
235  HMACNotAvailable = 1, ///< HMAC component is not responding (5 sec)
236  InvalidUUID = 2, ///< UUID is not greater than the one last used or value sent by the client is out of acceptable range (MIN, MAX)
237  InvalidTimestamp = 3, ///< Timestamp is not greater than the one last used or value sent by the client is out of acceptable range (MIN, MAX)
238  RequiredHMACSignatureMissing = 4, ///< empty bytes in HMACSignature field
239  RequiredAccessKeyIDMissing = 5, ///< empty bytes in AccessKeyID field
240  RequiredSessionMissing = 6, ///< empty bytes in Session field
241  RequiredFirmMissing = 7, ///< empty bytes in Firm field
242  RequiredUUIDMisssing = 8, ///< null value in UUID field
243  RequiredRequestTimestampMissing = 9, ///< null value in RequestTimestamp field
244  SessionBlocked = 10, ///< session and firm are not authorized for this port
245  InvalidAccessKeyID = 12, ///< contains non-printable ASCII character
246  InvalidSession = 13, ///< contains non-printable ASCII character
247  InvalidFirm = 14, ///< contains non-printable ASCII character
248  VolumeControls = 15, ///< exceeding TPS limit as defined for volume controls (reject action)
249  SplitMessageRejected = 16, ///< Messages queued due to split message penalty being rejected because of logout or disconnect
250  SplitMessageQueue = 17, ///< Reached threshold of messages queued due to split message penalty
251  DesignatedBackup = 27, ///< Using Designated backup before designated primary not allowed
252  NegotiateNotAllowed = 28, ///< Not allowed to negotiate on backup when established on primary
253  };
254 
255  /// \return a string that represents the given value.
256  ONIXS_ILINK3_EXPORTED static const char* toString(Enum value) ONIXS_ILINK3_NOTHROW;
257 
258  /// \return The NegotiationRejectErrorCode::Enum value that corresponds to the given integer value.
259  static NegotiationRejectErrorCode::Enum toErrorCode(unsigned short value) ONIXS_ILINK3_NOTHROW
260  {
261  return valueToErrorCode<NegotiationRejectErrorCode>(value);
262  }
263 };
264 
265 /**
266 * The <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/Establishment+Reject">Establishment Reject</a> message error codes.
267 */
269 {
270  enum Enum
271  {
272  NotSet = 255, ///< The value is not set
273  HMACNotAuthenticated = 0, ///< failed authentication because identity is not recognized
274  HMACNotAvailable = 1, ///< HMAC component is not responding (5sec)
275  InvalidUUID = 2, ///< UUID is not greater than the one last used or value sent by the client is out of acceptable range (MIN, MAX)
276  InvalidTimestamp = 3, ///< Timestamp is not greater than the one last used or value sent by the client is out of acceptable range (MIN, MAX)
277  RequiredHMACSignatureMissing = 4, ///< empty bytes in HMACSignature field
278  RequiredAccessKeyIDMissing = 5, ///< empty bytes in AccessKeyID field
279  RequiredSessionMissing = 6, ///< empty bytes in Session field
280  RequiredFirmMissing = 7, ///< empty bytes in Firm field
281  RequiredUUIDMisssing = 8, ///< null value in UUID field
282  RequiredRequestTimestampMissing = 9, ///< null value in RequestTimestamp field
283  SessionBlocked = 10, ///< session and firm are not authorized for this port
284  InvalidKeepAliveInterval = 11, ///< value is out of acceptable range (MIN, MAX)
285  InvalidAccessKeyID = 12, ///< contains non-printable ASCII character
286  InvalidSession = 13, ///< contains non-printable ASCII character
287  InvalidFirm = 14, ///< contains non-printable ASCII character
288  VolumeControls = 15, ///< exceeding TPS limit as defined for volume controls (reject action)
289  SplitMessageRejected = 16, ///< Messages queued due to split message penalty being rejected because of logout or disconnect
290  SplitMessageQueue = 17, ///< Reached threshold of messages queued due to split message penalty
291  RequiredTradingSystemNameMissing = 18, ///< empty bytes in TradingSystemName
292  RequiredTradingSystemVersionMissing = 19, ///< empty bytes in TradingSystemVersion
293  RequiredTradingSystemVendorMissing = 20, ///< empty bytes in TradingSystemVendor
294  RequiredKeepAliveIntervalMissing = 21, ///< null value in KeepAliveInterval field
295  RequiredNextSeqNoMissing = 22, ///< empty bytes in NextSeqNo field
296  InvalidTradingSystemName = 23, ///< contains non-prinatable ASCII character
297  InvalidTradingSystemVersion = 24, ///< contains non-prinatable ASCII character
298  InvalidTradingSystemVendor = 25, ///< contains non-prinatable ASCII character
299  DesignatedBackup = 27, ///< Using Designated backup before designated primary not allowed
300  };
301 
302  /// \return a string that represents the given value.
303  ONIXS_ILINK3_EXPORTED static const char* toString(Enum value) ONIXS_ILINK3_NOTHROW;
304 
305  /// \return The NegotiationRejectErrorCode::Enum value that corresponds to the given integer value.
306  static EstablishmentRejectErrorCode::Enum toErrorCode(unsigned short value) ONIXS_ILINK3_NOTHROW
307  {
308  return valueToErrorCode<EstablishmentRejectErrorCode>(value);
309  }
310 };
311 
312 namespace FuturesAndOptions
313 {
314 
315 /**
316 * The <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/Futures+and+Options+Reject+Codes">Establishment Reject</a> message error codes.
317 */
319 {
320  /// \return a string that represents the given value.
321  ONIXS_ILINK3_EXPORTED static const char* toString(unsigned short value) ONIXS_ILINK3_NOTHROW;
322 };
323 
324 }
325 
326 
327 namespace BrokerTec
328 {
329 
330 /**
331 * The <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/BrokerTec+Reject+Codes">Establishment Reject</a> message error codes.
332 */
334 {
335  /// \return a string that represents the given value.
336  ONIXS_ILINK3_EXPORTED static const char* toString(unsigned short value) ONIXS_ILINK3_NOTHROW;
337 };
338 
339 }
340 
341 namespace Ebs
342 {
343 
344 /**
345 * The <a href="https://www.cmegroup.com/confluence/display/EPICSANDBOX/EBS+Reject+Codes">Establishment Reject</a> message error codes.
346 */
348 {
349  /// \return a string that represents the given value.
350  ONIXS_ILINK3_EXPORTED static const char* toString(unsigned short value) ONIXS_ILINK3_NOTHROW;
351 };
352 
353 }
354 
355 
356 
357 
358 
359 }
360 }
361 }
The Establishment Reject message error codes.
Definition: ValuesEnums.h:268
static const char * toString(Enum type) noexcept
The Terminate message error codes.
Definition: ValuesEnums.h:183
Exceeded maximum number of allowable Party Details Definition Requests.
Definition: ValuesEnums.h:104
The Establishment Reject message error codes.
Definition: ValuesEnums.h:318
static TerminateErrorCode::Enum toErrorCode(unsigned short value) noexcept
Definition: ValuesEnums.h:220
The Establishment Reject message error codes.
Definition: ValuesEnums.h:347
New Order Cross Does Not Contain Buy Side Followed by Sell Side.
Definition: ValuesEnums.h:167
Another Message Sent in Between Party Details Definition Request and Business Message when using On -...
Definition: ValuesEnums.h:140
Unknown ID (unknown PartyDetailsListReqID being referenced in business message)
Definition: ValuesEnums.h:53
Unsupported Message Type (for example using messages specific to cash markets for futures) ...
Definition: ValuesEnums.h:59
Definition: Defines.h:40
Party Details Definition Request sent to MSGW Being Rejected Due to Corresponding Business Message Be...
Definition: ValuesEnums.h:137
Cannot Have More Than One In - Flight Party Details List Request in Progress.
Definition: ValuesEnums.h:149
Exceeded Maximum Number of In - Flight Order Status Requests.
Definition: ValuesEnums.h:146
Message Rejected Since PartyDetailsListReqID Does Not Match with Immediately Preceding Party Details ...
Definition: ValuesEnums.h:134
static BusinessRejectReason::Enum toRejectReason(unsigned short value) noexcept
Definition: ValuesEnums.h:174
Value is incorrect(out of range) for this tag (for example using a value outside defined range of int...
Definition: ValuesEnums.h:71
Incorrect data format for value (for example using ASCII character outside 32 - 126 in string field) ...
Definition: ValuesEnums.h:74
The Establishment Reject message error codes.
Definition: ValuesEnums.h:333
#define ONIXS_ILINK3_EXPORTED
Definition: Compiler.h:175
On - Demand Message Rejected Due to Preceding Party Details Definition Request Being Rejected...
Definition: ValuesEnums.h:131
Throttle Limit Exceeded (volume controls)
Definition: ValuesEnums.h:68
Invalid PartyDetailsListReqID(reusing already existing PartyDetailsListReqID while creating Party Det...
Definition: ValuesEnums.h:95
static NegotiationRejectErrorCode::Enum toErrorCode(unsigned short value) noexcept
Definition: ValuesEnums.h:259
ErrorCodesType::Enum valueToErrorCode(unsigned short value) noexcept
Definition: ValuesEnums.h:34
Exceeded Maximum Number of Allowable RequestingPartyID&#39;s in Party Details List Request.
Definition: ValuesEnums.h:125
Cannot Have More Than One In - Flight Mass Order Status Request in Progress.
Definition: ValuesEnums.h:143
The Negotiation Reject message error codes.
Definition: ValuesEnums.h:229
Party Details List Request cannot contain both RequestingPartyID and PartyID.
Definition: ValuesEnums.h:155
Buy Side Firm ID Does Not Match Sell Side Firm ID in New Order Cross.
Definition: ValuesEnums.h:161
Party Details Definition Request Being Rejected Since Another Message was sent in Between On - Demand...
Definition: ValuesEnums.h:158
#define ONIXS_ILINK3_NOTHROW
Definition: Compiler.h:176
Incoming message could not be decoded.
Definition: ValuesEnums.h:98
Party Details List Request is Missing Requesting Party ID and Party ID.
Definition: ValuesEnums.h:152
Code to identify reason for a Business Message Reject message.
Definition: ValuesEnums.h:42
static EstablishmentRejectErrorCode::Enum toErrorCode(unsigned short value) noexcept
Definition: ValuesEnums.h:306