OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  8.1.0
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  if(containPreviousClosingPrice())
142  {
143  if( !first )
144  builder << "|";
145  builder << "BD";
146  first = false;
147  }
148  if(containVolumeOnly())
149  {
150  if( !first )
151  builder << "|";
152  builder << "a";
153  first = false;
154  }
155  if(containSystematicInternalizer())
156  {
157  if( !first )
158  builder << "|";
159  builder << "AZ";
160  first = false;
161  }
162  if(containMidpointPrice())
163  {
164  if( !first )
165  builder << "|";
166  builder << "BB";
167  first = false;
168  }
169  if(containTradingOnTermsOfIssue())
170  {
171  if( !first )
172  builder << "|";
173  builder << "BC";
174  first = false;
175  }
176  if(containSpecialAuction())
177  {
178  if( !first )
179  builder << "|";
180  builder << "SA";
181  first = false;
182  }
183 
184  return builder.toString();
185 }
186 
187 namespace EOBI
188 {
189 
190  std::string Side::toString(Side::Enum value)
191  {
192  switch(value)
193  {
194  case Side::Buy:
195  return "Buy";
196 
197  case Side::Sell:
198  return "Sell";
199 
200  default:
201  return "Unknown";
202  };
203  }
204 
205  std::string AggressorSide::toString(AggressorSide::Enum value)
206  {
207  switch(value)
208  {
209  case AggressorSide::Buy:
210  return "Buy";
211 
212  case AggressorSide::Sell:
213  return "Sell";
214 
215  default:
216  return "Unknown";
217  };
218  }
219 
220  std::string LegSide::toString(LegSide::Enum value)
221  {
222  switch(value)
223  {
224  case LegSide::Buy:
225  return "Buy";
226 
227  case LegSide::Sell:
228  return "Sell";
229 
230  default:
231  return "Unknown";
232  };
233  }
234 
235  std::string SecurityStatus::toString(SecurityStatus::Enum value)
236  {
237  switch(value)
238  {
240  return "Active";
241 
243  return "Inactive";
244 
246  return "Expired";
247 
249  return "Suspended";
250 
252  return "PendingDeletion";
253 
254  default:
255  return "Unknown";
256  };
257  }
258 
259  std::string SecurityTradingStatus::toString(SecurityTradingStatus::Enum value)
260  {
261  switch(value)
262  {
263  case SecurityTradingStatus::Closed: return "Closed";
264  case SecurityTradingStatus::Restricted: return "Restricted";
265  case SecurityTradingStatus::Book: return "Book";
266  case SecurityTradingStatus::Continuous: return "Continuous";
267  case SecurityTradingStatus::OpeningAuction: return "OpeningAuction";
268  case SecurityTradingStatus::OpeningAuctionFreeze: return "OpeningAuctionFreeze";
269  case SecurityTradingStatus::IntradayAuction: return "IntradayAuction";
270  case SecurityTradingStatus::IntradayAuctionFreeze: return "IntradayAuctionFreeze";
271  case SecurityTradingStatus::CircuitBreakerAuction: return "CircuitBreakerAuction";
272  case SecurityTradingStatus::CircuitBreakerAuctionFreeze: return "CircuitBreakerAuctionFreeze";
273  case SecurityTradingStatus::ClosingAuction: return "ClosingAuction";
274  case SecurityTradingStatus::ClosingAuctionFreeze: return "ClosingAuctionFreeze";
275  case SecurityTradingStatus::IPOAuction: return "IPOAuction";
276  case SecurityTradingStatus::IPOAuctionFreeze: return "IPOAuctionFreeze";
277  case SecurityTradingStatus::PreCall: return "PreCall";
278  case SecurityTradingStatus::Call: return "Call";
279  case SecurityTradingStatus::Freeze: return "Freeze";
280 
281  default:
282  return "Unknown";
283  };
284  }
285 
286  std::string ApplSeqResetIndicator::toString(ApplSeqResetIndicator::Enum value)
287  {
288  switch(value)
289  {
290  case ApplSeqResetIndicator::NoReset:
291  return "NoReset";
292 
293  case ApplSeqResetIndicator::Reset:
294  return "Reset";
295 
296  default:
297  return "Unknown";
298  };
299  }
300 
301  std::string CompletionIndicator::toString(CompletionIndicator::Enum value)
302  {
303  switch(value)
304  {
305  case CompletionIndicator::Incomplete:
306  return "Incomplete";
307 
308  case CompletionIndicator::Complete:
309  return "Complete";
310 
311  default:
312  return "Unknown";
313  };
314  }
315 
316  std::string MatchType::toString(MatchType::Enum value)
317  {
318  switch(value)
319  {
320  case MatchType::ConfirmedTradeReport:
321  return "ConfirmedTradeReport";
322 
323  case MatchType::CrossAuction:
324  return "CrossAuction";
325 
327  return "CallAuction";
328 
329  default:
330  return "Unknown";
331  };
332  }
333 
334  std::string MatchSubType::toString(MatchSubType::Enum value)
335  {
336  switch(value)
337  {
338  case MatchSubType::OpeningAuction:
339  return "OpeningAuction";
340 
341  case MatchSubType::ClosingAuction:
342  return "ClosingAuction";
343 
344  case MatchSubType::IntradayAuction:
345  return "IntradayAuction";
346 
347  case MatchSubType::CircuitBreakerAuction:
348  return "CircuitBreakerAuction";
349 
350  case MatchSubType::IPOAuction:
351  return "IPOAuction";
352 
353  default:
354  return "Unknown";
355  };
356  }
357 
358 
359  std::string FastMarketIndicator::toString(FastMarketIndicator::Enum value)
360  {
361  switch(value)
362  {
363  case FastMarketIndicator::No:
364  return "No";
365 
366  case FastMarketIndicator::Yes:
367  return "Yes";
368 
369  default:
370  return "Unknown";
371  };
372  }
373 
374  std::string TradSesStatus::toString(TradSesStatus::Enum value)
375  {
376  switch(value)
377  {
379  return "Halted";
380 
381  case TradSesStatus::Open:
382  return "Open";
383 
385  return "Closed";
386 
387  default:
388  return "Unknown";
389  };
390  }
391 
392  std::string TradingSessionID::toString(TradingSessionID::Enum value)
393  {
394  switch(value)
395  {
396  case TradingSessionID::Day:
397  return "Day";
398 
399  case TradingSessionID::Morning:
400  return "Morning";
401 
402  case TradingSessionID::Evening:
403  return "Evening";
404 
405  case TradingSessionID::AfterHours:
406  return "AfterHours";
407 
408  case TradingSessionID::Holiday:
409  return "Holiday";
410 
411  default:
412  return "Unknown";
413  };
414  }
415 
416  std::string TradingSessionSubID::toString(TradingSessionSubID::Enum value)
417  {
418  switch(value)
419  {
421  return "PreTrading";
422 
424  return "Trading";
425 
427  return "Closing";
428 
430  return "PostTrading";
431 
433  return "Quiescent";
434 
435  default:
436  return "Unknown";
437  };
438  }
439 
440 
441  std::string TradSesEvent::toString(TradSesEvent::Enum value)
442  {
443  switch(value)
444  {
445  case TradSesEvent::TBD:
446  return "TBD";
447 
448  case TradSesEvent::StatusChange:
449  return "StatusChange";
450 
451  default:
452  return "Unknown";
453  };
454  }
455 
456  std::string SecurityIDSource::toString(SecurityIDSource::Enum value)
457  {
458  switch(value)
459  {
460  case SecurityIDSource::Marketplace:
461  return "Marketplace";
462 
463  default:
464  return "Unknown";
465  };
466  }
467 
468  std::string LegSecurityIDSource::toString(LegSecurityIDSource::Enum value)
469  {
470  switch(value)
471  {
472  case LegSecurityIDSource::Marketplace:
473  return "Marketplace";
474 
475  default:
476  return "Unknown";
477  };
478  }
479 
480  std::string NoMarketSegments::toString(NoMarketSegments::Enum value)
481  {
482  switch(value)
483  {
484  case NoMarketSegments::One:
485  return "One";
486 
487  default:
488  return "Unknown";
489  };
490  }
491 
492  std::string SecurityType::toString(SecurityType::Enum value)
493  {
494  switch(value)
495  {
497  return "Option";
498 
500  return "Future";
501 
502  case SecurityType::MultiLeg:
503  return "MultiLeg";
504 
505  default:
506  return "Unknown";
507  };
508  }
509 
510  std::string ProductComplex::toString(ProductComplex::Enum value)
511  {
512  switch(value)
513  {
514  case ProductComplex::StandardOptionStrategy: return "StandardOptionStrategy";
515  case ProductComplex::NonStandardOptionStrategy: return "NonStandardOptionStrategy";
516  case ProductComplex::VolatilityStrategy: return "VolatilityStrategy";
517  case ProductComplex::FuturesSpread: return "FuturesSpread";
518  case ProductComplex::InterProductSpread: return "InterProductSpread";
519  case ProductComplex::StandardFuturesStrategy: return "StandardFuturesStrategy";
520  case ProductComplex::PackAndBundle: return "PackAndBundle";
521  case ProductComplex::Strip: return "Strip";
522 
523  default:
524  return "Unknown";
525  };
526  }
527 
528  std::string ImpliedMarketIndicator::toString(ImpliedMarketIndicator::Enum value)
529  {
530  switch(value)
531  {
533  return "NotImplied";
534 
535  case ImpliedMarketIndicator::ImpliedInOut:
536  return "ImpliedInOut";
537 
538  default:
539  return "Unknown";
540  };
541  }
542 
543  std::string TradeCondition::toString(TradeCondition::Enum value)
544  {
545  switch (value)
546  {
547  case TradeCondition::ImpliedTrade:
548  return "ImpliedTrade";
549 
550  case TradeCondition::OutOfSequence:
551  return "OutOfSequence";
552 
554  return "SystematicInternalizer";
555 
557  return "MidpointPrice";
558 
560  return "TradingOnTermsOfIssue";
561 
562  case TradeCondition::SpetialAuction:
563  return "SpetialAuction";
564 
565  default:
566  return "Unknown";
567  }
568  }
569 
570  std::string MDEntryType::toString(MDEntryType::Enum value)
571  {
572  switch(value)
573  {
574  case Trade:
575  return "Trade";
576 
577  case OpeningPrice:
578  return "OpeningPrice";
579 
580  case ClosingPrice:
581  return "ClosingPrice";
582 
583  case HighPrice:
584  return "HighPrice";
585 
586  case LowPrice:
587  return "LowPrice";
588 
589  case TradeVolume:
590  return "TradeVolume";
591 
592  case PreviousClosingPrice:
593  return "PreviousClosingPrice";
594 
595  case OpeningAuction:
596  return "OpeningAuction";
597 
598  case IntradayAuction:
599  return "IntradayAuction";
600 
601  case CircuitBreakerAuction:
602  return "CircuitBreakerAuction";
603 
604  case ClosingAuction:
605  return "ClosingAuction";
606 
607  case IPOAuction:
608  return "IPOAuction";
609 
610  default:
611  return "Unknown";
612  };
613  }
614 
615  std::string PotentialSecurityTradingEvent::toString(PotentialSecurityTradingEvent::Enum value)
616  {
617  switch(value)
618  {
619  case PotentialSecurityTradingEvent::None:
620  return "None";
621 
622  case PotentialSecurityTradingEvent::PriceVolatilityAuctionIsExtended:
623  return "PriceVolatilityAuctionIsExtended";
624 
625  default:
626  return "Unknown";
627  };
628  }
629 
630  std::string OrdType::toString(OrdType::Enum value)
631  {
632  switch (value)
633  {
634  case OrdType::MarketOrder:
635  return "MarketOrder";
636 
637  default:
638  return "Unknown";
639  };
640  }
641 
642  std::string SecurityTradingEvent::toString(SecurityTradingEvent::Enum value)
643  {
644  switch(value)
645  {
647  return "PriceVolatilityAuctionIsExtended";
648 
650  return "PriceVolatilityAuctionIsExtendedAgain";
651 
652  default:
653  return "Unknown";
654  };
655  }
656 
657  std::string OrderType::toString(OrderType::Enum value)
658  {
659  switch(value)
660  {
661  case OrderType::MarketOrder:
662  return "MarketOrder";
663 
664  default:
665  return "Unknown";
666  };
667  }
668 
669  std::string AlgorithmicTradeIndicator::toString(AlgorithmicTradeIndicator::Enum value)
670  {
671  switch (value)
672  {
674  return "AlgorithmicTrade";
675 
676  default:
677  return "Unknown";
678  };
679  }
680 
681  std::string MarketCondition::toString(MarketCondition::Enum value)
682  {
683  switch (value)
684  {
686  return "Normal";
687 
689  return "Stressed";
690 
691  default:
692  return "Unknown";
693  };
694  }
695 
696  std::string LegSecurityType::toString(LegSecurityType::Enum value)
697  {
698  switch (value)
699  {
700  case LegSecurityType::LegSecurityMultiLeg:
701  return "LegSecurityMultiLeg";
702 
703  case LegSecurityType::LegSecurityUnderlyingLeg:
704  return "LegSecurityUnderlyingLeg";
705 
706  default:
707  return "Unknown";
708  };
709  }
710 
711  std::string SoldOutIndicator::toString(SoldOutIndicator::Enum value)
712  {
713  switch (value)
714  {
716  return "SoldOut";
717 
718  default:
719  return "Unknown";
720  }
721  }
722 
723  std::string InstrumentScopeProductComplex::toString(InstrumentScopeProductComplex::Enum value)
724  {
725  switch (value)
726  {
727  case InstrumentScopeProductComplex::SimpleInstrument:
728  return "SimpleInstrument";
729 
730  case InstrumentScopeProductComplex::StandardOptionStrategy:
731  return "StandardOptionStrategy";
732 
733  case InstrumentScopeProductComplex::NonStandardOptionStrategy:
734  return "NonStandardOptionStrategy";
735 
736  case InstrumentScopeProductComplex::VolatilityStrategy:
737  return "VolatilityStrategy";
738 
739  case InstrumentScopeProductComplex::FuturesSpread:
740  return "FuturesSpread";
741 
742  case InstrumentScopeProductComplex::InterProductSpread:
743  return "InterProductSpread";
744 
745  case InstrumentScopeProductComplex::StandardFuturesStrategy:
746  return "StandardFuturesStrategy";
747 
748  case InstrumentScopeProductComplex::PackAndBundle:
749  return "PackAndBundle";
750 
751  case InstrumentScopeProductComplex::Strip:
752  return "Strip";
753 
754  default:
755  return "Unknown";
756  }
757  }
758 
759  std::string SecurityMassStatus::toString(SecurityMassStatus::Enum value)
760  {
761  switch (value)
762  {
763  case SecurityMassStatus::Active:
764  return "Active";
765 
766  case SecurityMassStatus::Inactive:
767  return "Inactive";
768 
769  case SecurityMassStatus::Expired:
770  return "Expired";
771 
772  case SecurityMassStatus::KnockedOut:
773  return "KnockedOut";
774 
775  case SecurityMassStatus::KnockOutRevoked:
776  return "KnockOutRevoked";
777 
778  case SecurityMassStatus::Suspended:
779  return "Suspended";
780 
781  case SecurityMassStatus::PendingDeletion:
782  return "PendingDeletion";
783 
784  case SecurityMassStatus::KnockedOutAndSuspended:
785  return "KnockedOutAndSuspended";
786 
787  default:
788  return "Unknown";
789  }
790  }
791 
792 
793  std::string SecurityMassTradingStatus::toString(SecurityMassTradingStatus::Enum value)
794  {
795  switch (value)
796  {
797  case SecurityMassTradingStatus::TradingHalt:
798  return "TradingHalt";
799 
800  case SecurityMassTradingStatus::MarketImbalanceBuy:
801  return "MarketImbalanceBuy";
802 
803  case SecurityMassTradingStatus::MarketImbalanceSell:
804  return "MarketImbalanceSell";
805 
806  case SecurityMassTradingStatus::Closed:
807  return "Closed";
808 
809  case SecurityMassTradingStatus::Restricted:
810  return "Restricted";
811 
812  case SecurityMassTradingStatus::Book:
813  return "Book";
814 
815  case SecurityMassTradingStatus::Continuous:
816  return "Continuous";
817 
818  case SecurityMassTradingStatus::OpeningAuction:
819  return "OpeningAuction";
820 
821  case SecurityMassTradingStatus::OpeningAuctionFreeze:
822  return "OpeningAuctionFreeze";
823 
824  case SecurityMassTradingStatus::IntradayAuction:
825  return "IntradayAuction";
826 
827  case SecurityMassTradingStatus::IntradayAuctionFreeze:
828  return "IntradayAuctionFreeze";
829 
830  case SecurityMassTradingStatus::CircuitBreakerAuction:
831  return "CircuitBreakerAuction";
832 
833  case SecurityMassTradingStatus::CircuitBreakerAuctionFreeze:
834  return "CircuitBreakerAuctionFreeze";
835 
836  case SecurityMassTradingStatus::ClosingAuction:
837  return "ClosingAuction";
838 
839  case SecurityMassTradingStatus::ClosingAuctionFreeze:
840  return "ClosingAuctionFreeze";
841 
842  case SecurityMassTradingStatus::IPOAuction:
843  return "IPOAuction";
844 
845  case SecurityMassTradingStatus::IPOAuctionFreeze:
846  return "IPOAuctionFreeze";
847 
848  case SecurityMassTradingStatus::PreCall:
849  return "PreCall";
850 
851  case SecurityMassTradingStatus::Call:
852  return "Call";
853 
854  case SecurityMassTradingStatus::Freeze:
855  return "Freeze";
856 
857  default:
858  return "Unknown";
859  }
860  }
861 
862  std::string MassMarketCondition::toString(MassMarketCondition::Enum value)
863  {
864  switch (value)
865  {
866  case MassMarketCondition::Normal:
867  return "Normal";
868 
869  case MassMarketCondition::Stressed:
870  return "Stressed";
871 
872  default:
873  return "Unknown";
874  }
875  }
876 
877  std::string SecurityMassTradingEvent::toString(SecurityMassTradingEvent::Enum value)
878  {
879  switch (value)
880  {
881  case SecurityMassTradingEvent::PriceVolatilityAuctionIsExtended:
882  return "PriceVolatilityAuctionIsExtended";
883 
884  case SecurityMassTradingEvent::PriceVolatilityAuctionIsExtendedAgain:
885  return "PriceVolatilityAuctionIsExtendedAgain";
886 
887  default:
888  return "Unknown";
889  }
890  }
891 
892  std::string MassSoldOutIndicator::toString(MassSoldOutIndicator::Enum value)
893  {
894  switch (value)
895  {
896  case MassSoldOutIndicator::SoldOut:
897  return "SoldOut";
898 
899  default:
900  return "Unknown";
901  }
902  }
903 
904  std::string LastFragment::toString(LastFragment::Enum value)
905  {
906  switch (value)
907  {
908  case LastFragment::N:
909  return "No";
910 
911  case LastFragment::Y:
912  return "Yes";
913 
914  default:
915  return "Unknown";
916  }
917  }
918 
919 
920 
921 
922 
923 } // namespace EOBI
924 
925 }}}
926 
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