OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  7.4.2
API documentation
Defines.cpp
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 
21 
22 #include <util/TextBuilder.h>
23 
24 namespace OnixS {
25 namespace Eurex {
26 namespace MarketData {
27 
28 using namespace Util;
29 
30 std::string TrdType::toString(TrdType::Enum value)
31 {
32  switch(value)
33  {
34  case TrdType::Undefined:
35  return "Undefined";
36 
38  return "RegularTrade";
39 
41  return "BlockTrade";
42 
43  case TrdType::EFP:
44  return "EFP";
45 
47  return "ExchangeForSwap";
48 
50  return "ExchangeBasisFacility";
51 
52  case TrdType::VolaTrade:
53  return "VolaTrade";
54 
56  return "EFPFinTrade";
57 
59  return "EFPIndexFuturesTrade";
60 
62  return "BlockTradeAtMarket";
63 
65  return "XetraEurexEnlightTriggeredTrade";
66 
68  return "OpeningAuctionTrade";
69 
71  return "IntradayAuctionTrade";
72 
74  return "VolatilityAuctionTrade";
75 
77  return "ClosingAuctionTrade";
78 
80  return "CrossAuctionTrade";
81 
83  return "IPOAuctionTrade";
84 
85  default:
86  return "Unknown";
87  };
88 }
89 
90 std::string TradeConditionSet::toString() const
91 {
92  TextBuilder builder;
93  bool first = true;
94  if(containExchangeLast())
95  {
96  builder << "U";
97  first = false;
98  }
99  if(containOpeningPrice())
100  {
101  if( !first )
102  builder << "|";
103  builder << "R";
104  first = false;
105  }
106  if(containHighPrice())
107  {
108  if( !first )
109  builder << "|";
110  builder << "AX";
111  first = false;
112  }
113  if(containLowPrice())
114  {
115  if( !first )
116  builder << "|";
117  builder << "AY";
118  first = false;
119  }
120  if(containOfficialClosingPrice())
121  {
122  if( !first )
123  builder << "|";
124  builder << "AJ";
125  first = false;
126  }
127  if(containLastAuctionPrice())
128  {
129  if( !first )
130  builder << "|";
131  builder << "AW";
132  first = false;
133  }
134  if(containOutOfSequenceETH())
135  {
136  if( !first )
137  builder << "|";
138  builder << "k";
139  first = false;
140  }
141 
142  return builder.toString();
143 }
144 
145 namespace EOBI
146 {
147 
148  std::string Side::toString(Side::Enum value)
149  {
150  switch(value)
151  {
152  case Side::Buy:
153  return "Buy";
154 
155  case Side::Sell:
156  return "Sell";
157 
158  default:
159  return "Unknown";
160  };
161  }
162 
163  std::string AggressorSide::toString(AggressorSide::Enum value)
164  {
165  switch(value)
166  {
167  case AggressorSide::Buy:
168  return "Buy";
169 
170  case AggressorSide::Sell:
171  return "Sell";
172 
173  default:
174  return "Unknown";
175  };
176  }
177 
178  std::string LegSide::toString(LegSide::Enum value)
179  {
180  switch(value)
181  {
182  case LegSide::Buy:
183  return "Buy";
184 
185  case LegSide::Sell:
186  return "Sell";
187 
188  default:
189  return "Unknown";
190  };
191  }
192 
193  std::string SecurityStatus::toString(SecurityStatus::Enum value)
194  {
195  switch(value)
196  {
198  return "Active";
199 
201  return "Inactive";
202 
204  return "Expired";
205 
207  return "Suspended";
208 
210  return "PendingDeletion";
211 
212  default:
213  return "Unknown";
214  };
215  }
216 
217  std::string SecurityTradingStatus::toString(SecurityTradingStatus::Enum value)
218  {
219  switch(value)
220  {
221  case SecurityTradingStatus::Closed: return "Closed";
222  case SecurityTradingStatus::Restricted: return "Restricted";
223  case SecurityTradingStatus::Book: return "Book";
224  case SecurityTradingStatus::Continuous: return "Continuous";
225  case SecurityTradingStatus::OpeningAuction: return "OpeningAuction";
226  case SecurityTradingStatus::OpeningAuctionFreeze: return "OpeningAuctionFreeze";
227  case SecurityTradingStatus::IntradayAuction: return "IntradayAuction";
228  case SecurityTradingStatus::IntradayAuctionFreeze: return "IntradayAuctionFreeze";
229  case SecurityTradingStatus::CircuitBreakerAuction: return "CircuitBreakerAuction";
230  case SecurityTradingStatus::CircuitBreakerAuctionFreeze: return "CircuitBreakerAuctionFreeze";
231  case SecurityTradingStatus::ClosingAuction: return "ClosingAuction";
232  case SecurityTradingStatus::ClosingAuctionFreeze: return "ClosingAuctionFreeze";
233  case SecurityTradingStatus::IPOAuction: return "IPOAuction";
234  case SecurityTradingStatus::IPOAuctionFreeze: return "IPOAuctionFreeze";
235  case SecurityTradingStatus::PreCall: return "PreCall";
236  case SecurityTradingStatus::Call: return "Call";
237 
238  default:
239  return "Unknown";
240  };
241  }
242 
243  std::string ApplSeqResetIndicator::toString(ApplSeqResetIndicator::Enum value)
244  {
245  switch(value)
246  {
247  case ApplSeqResetIndicator::NoReset:
248  return "NoReset";
249 
250  case ApplSeqResetIndicator::Reset:
251  return "Reset";
252 
253  default:
254  return "Unknown";
255  };
256  }
257 
258  std::string CompletionIndicator::toString(CompletionIndicator::Enum value)
259  {
260  switch(value)
261  {
262  case CompletionIndicator::Incomplete:
263  return "Incomplete";
264 
265  case CompletionIndicator::Complete:
266  return "Complete";
267 
268  default:
269  return "Unknown";
270  };
271  }
272 
273  std::string MatchType::toString(MatchType::Enum value)
274  {
275  switch(value)
276  {
277  case MatchType::ConfirmedTradeReport:
278  return "ConfirmedTradeReport";
279 
280  case MatchType::CrossAuction:
281  return "CrossAuction";
282 
284  return "CallAuction";
285 
286  default:
287  return "Unknown";
288  };
289  }
290 
291  std::string MatchSubType::toString(MatchSubType::Enum value)
292  {
293  switch(value)
294  {
295  case MatchSubType::OpeningAuction:
296  return "OpeningAuction";
297 
298  case MatchSubType::ClosingAuction:
299  return "ClosingAuction";
300 
301  case MatchSubType::IntradayAuction:
302  return "IntradayAuction";
303 
304  case MatchSubType::CircuitBreakerAuction:
305  return "CircuitBreakerAuction";
306 
307  case MatchSubType::IPOAuction:
308  return "IPOAuction";
309 
310  default:
311  return "Unknown";
312  };
313  }
314 
315 
316  std::string FastMarketIndicator::toString(FastMarketIndicator::Enum value)
317  {
318  switch(value)
319  {
320  case FastMarketIndicator::No:
321  return "No";
322 
323  case FastMarketIndicator::Yes:
324  return "Yes";
325 
326  default:
327  return "Unknown";
328  };
329  }
330 
331  std::string TradSesStatus::toString(TradSesStatus::Enum value)
332  {
333  switch(value)
334  {
336  return "Halted";
337 
338  case TradSesStatus::Open:
339  return "Open";
340 
342  return "Closed";
343 
344  default:
345  return "Unknown";
346  };
347  }
348 
349  std::string TradingSessionID::toString(TradingSessionID::Enum value)
350  {
351  switch(value)
352  {
353  case TradingSessionID::Day:
354  return "Day";
355 
356  case TradingSessionID::Morning:
357  return "Morning";
358 
359  case TradingSessionID::Evening:
360  return "Evening";
361 
362  case TradingSessionID::AfterHours:
363  return "AfterHours";
364 
365  case TradingSessionID::Holiday:
366  return "Holiday";
367 
368  default:
369  return "Unknown";
370  };
371  }
372 
373  std::string TradingSessionSubID::toString(TradingSessionSubID::Enum value)
374  {
375  switch(value)
376  {
378  return "PreTrading";
379 
381  return "Trading";
382 
384  return "Closing";
385 
387  return "PostTrading";
388 
390  return "Quiescent";
391 
392  default:
393  return "Unknown";
394  };
395  }
396 
397 
398  std::string TradSesEvent::toString(TradSesEvent::Enum value)
399  {
400  switch(value)
401  {
402  case TradSesEvent::TBD:
403  return "TBD";
404 
405  case TradSesEvent::StatusChange:
406  return "StatusChange";
407 
408  default:
409  return "Unknown";
410  };
411  }
412 
413  std::string SecurityIDSource::toString(SecurityIDSource::Enum value)
414  {
415  switch(value)
416  {
417  case SecurityIDSource::Marketplace:
418  return "Marketplace";
419 
420  default:
421  return "Unknown";
422  };
423  }
424 
425  std::string LegSecurityIDSource::toString(LegSecurityIDSource::Enum value)
426  {
427  switch(value)
428  {
429  case LegSecurityIDSource::Marketplace:
430  return "Marketplace";
431 
432  default:
433  return "Unknown";
434  };
435  }
436 
437  std::string NoMarketSegments::toString(NoMarketSegments::Enum value)
438  {
439  switch(value)
440  {
441  case NoMarketSegments::One:
442  return "One";
443 
444  default:
445  return "Unknown";
446  };
447  }
448 
449  std::string SecurityType::toString(SecurityType::Enum value)
450  {
451  switch(value)
452  {
454  return "Option";
455 
457  return "Future";
458 
459  case SecurityType::MultiLeg:
460  return "MultiLeg";
461 
462  default:
463  return "Unknown";
464  };
465  }
466 
467  std::string ProductComplex::toString(ProductComplex::Enum value)
468  {
469  switch(value)
470  {
471  case ProductComplex::StandardOptionStrategy: return "StandardOptionStrategy";
472  case ProductComplex::NonStandardOptionStrategy: return "NonStandardOptionStrategy";
473  case ProductComplex::VolatilityStrategy: return "VolatilityStrategy";
474  case ProductComplex::FuturesSpread: return "FuturesSpread";
475  case ProductComplex::InterProductSpread: return "InterProductSpread";
476  case ProductComplex::StandardFuturesStrategy: return "StandardFuturesStrategy";
477  case ProductComplex::PackAndBundle: return "PackAndBundle";
478  case ProductComplex::Strip: return "Strip";
479 
480  default:
481  return "Unknown";
482  };
483  }
484 
485  std::string ImpliedMarketIndicator::toString(ImpliedMarketIndicator::Enum value)
486  {
487  switch(value)
488  {
490  return "NotImplied";
491 
492  case ImpliedMarketIndicator::ImpliedInOut:
493  return "ImpliedInOut";
494 
495  default:
496  return "Unknown";
497  };
498  }
499 
500  std::string TradeCondition::toString(TradeCondition::Enum value)
501  {
502  switch (value)
503  {
504  case TradeCondition::ImpliedTrade:
505  return "ImpliedTrade";
506 
507  case TradeCondition::OutOfSequence:
508  return "OutOfSequence";
509 
511  return "SystematicInternalizer";
512 
514  return "MidpointPrice";
515 
517  return "TradedBeforeIssueDate";
518 
519  default:
520  return "Unknown";
521  }
522  }
523 
524  std::string MDEntryType::toString(MDEntryType::Enum value)
525  {
526  switch(value)
527  {
528  case Trade:
529  return "Trade";
530 
531  case OpeningPrice:
532  return "OpeningPrice";
533 
534  case ClosingPrice:
535  return "ClosingPrice";
536 
537  case HighPrice:
538  return "HighPrice";
539 
540  case LowPrice:
541  return "LowPrice";
542 
543  case TradeVolume:
544  return "TradeVolume";
545 
546  case PreviousClosingPrice:
547  return "PreviousClosingPrice";
548 
549  case OpeningAuction:
550  return "OpeningAuction";
551 
552  case IntradayAuction:
553  return "IntradayAuction";
554 
555  case CircuitBreakerAuction:
556  return "CircuitBreakerAuction";
557 
558  case ClosingAuction:
559  return "ClosingAuction";
560 
561  case IPOAuction:
562  return "IPOAuction";
563 
564  default:
565  return "Unknown";
566  };
567  }
568 
569  std::string PotentialSecurityTradingEvent::toString(PotentialSecurityTradingEvent::Enum value)
570  {
571  switch(value)
572  {
573  case PotentialSecurityTradingEvent::None:
574  return "None";
575 
576  case PotentialSecurityTradingEvent::PriceVolatilityAuctionIsExtended:
577  return "PriceVolatilityAuctionIsExtended";
578 
579  default:
580  return "Unknown";
581  };
582  }
583 
584  std::string OrdType::toString(OrdType::Enum value)
585  {
586  switch (value)
587  {
588  case OrdType::MarketOrder:
589  return "MarketOrder";
590 
591  default:
592  return "Unknown";
593  };
594  }
595 
596  std::string SecurityTradingEvent::toString(SecurityTradingEvent::Enum value)
597  {
598  switch(value)
599  {
601  return "PriceVolatilityAuctionIsExtended";
602 
604  return "PriceVolatilityAuctionIsExtendedAgain";
605 
606  default:
607  return "Unknown";
608  };
609  }
610 
611  std::string OrderType::toString(OrderType::Enum value)
612  {
613  switch(value)
614  {
615  case OrderType::MarketOrder:
616  return "MarketOrder";
617 
618  default:
619  return "Unknown";
620  };
621  }
622 
623  std::string AlgorithmicTradeIndicator::toString(AlgorithmicTradeIndicator::Enum value)
624  {
625  switch (value)
626  {
628  return "AlgorithmicTrade";
629 
630  default:
631  return "Unknown";
632  };
633  }
634 
635  std::string MarketCondition::toString(MarketCondition::Enum value)
636  {
637  switch (value)
638  {
640  return "Normal";
641 
643  return "Stressed";
644 
645  default:
646  return "Unknown";
647  };
648  }
649 
650  std::string LegSecurityType::toString(LegSecurityType::Enum value)
651  {
652  switch (value)
653  {
654  case LegSecurityType::LegSecurityMultiLeg:
655  return "LegSecurityMultiLeg";
656 
657  case LegSecurityType::LegSecurityUnderlyingLeg:
658  return "LegSecurityUnderlyingLeg";
659 
660  default:
661  return "Unknown";
662  };
663  }
664 
665 
666 } // namespace EOBI
667 
668 }}}
669 
Util::TextBuilder TextBuilder
Definition: Formatting.h:43
Definition: Defines.h:30
Used to identify absence of value.
Definition: Defines.h:286
Defines if product is traded on on NTA.
Definition: Defines.h:151
static std::string toString(Enum value)
Definition: Defines.cpp:30
Exchange for Physical Fin trade.
Definition: Defines.h:310
Exchange for Physical.
Definition: Defines.h:295