OnixS C++ CME Market Data Handler  5.7.0
API documentation
ConsolidatedBook.h
Go to the documentation of this file.
1 // Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2 //
3 // This software owned by Onix Solutions Limited [OnixS] and is
4 // protected by copyright law and international copyright treaties.
5 //
6 // Access to and use of the software is governed by the terms of the applicable
7 // OnixS Software Services Agreement (the Agreement) and Customer end user license
8 // agreements granting a non-assignable, non-transferable and non-exclusive license
9 // to use the software for it's own data processing purposes under the terms defined
10 // in the Agreement.
11 //
12 // Except as otherwise granted within the terms of the Agreement, copying or
13 // reproduction of any part of this source code or associated reference material
14 // to any other location for further reproduction or redistribution, and any
15 // amendments to this copyright notice, are expressly prohibited.
16 //
17 // Any reproduction or redistribution for sale or hiring of the Software not in
18 // accordance with the terms of the Agreement is a violation of copyright law.
19 //
20 
21 #pragma once
22 
25 
27 
29 
30 /// Consolidated Order Book.
31 ///
32 /// A set of bid prices and ask prices for the given
33 /// security (bids are descending and asks are ascending).
34 /// The quantity is provided at each price level.
35 ///
36 /// In addition to regular book interface, provides access
37 /// to detailed consolidated price level data like direct
38 /// and implied quantity components.
39 typedef
40 MbpBook
41 <
42  ConsolidatedPriceLevel,
44 >
46 
47 /// Factory for consolidated books.
48 typedef
50 <
53 >
55 
56 /// Book brief info.
57 ONIXS_CMEMDH_EXPORTED
58 void
59 brief(
60  std::string&,
61  const ConsolidatedBook&);
62 
63 /// Book brief info.
64 inline
65 std::string
67  const ConsolidatedBook& book)
68 {
69  std::string str;
70 
71  brief(str, book);
72 
73  return str;
74 }
75 
76 /// Serializes book.
77 ONIXS_CMEMDH_EXPORTED
78 void
79 toStr(
80  std::string&,
81  const ConsolidatedBook&);
82 
83 /// Serializes book.
84 inline
85 std::string
87  const ConsolidatedBook& book)
88 {
89  std::string str;
90 
91  toStr(str, book);
92 
93  return str;
94 }
95 
96 /// Serializes book in formatted form.
97 ONIXS_CMEMDH_EXPORTED
98 void
100  std::string&,
101  const ConsolidatedBook&);
102 
103 /// Serializes book in formatted form.
104 inline
105 std::string
107  const ConsolidatedBook& book)
108 {
109  std::string str;
110 
111  toFormattedStr(str, book);
112 
113  return str;
114 }
115 
116 //
117 
118 /// Consolidates direct and implied
119 /// books into given instance.
120 ONIXS_CMEMDH_EXPORTED
121 void
124  const DirectBook&,
125  const ImpliedBook&);
126 
MbpBook< ConsolidatedPriceLevel, MbpBookDepth > ConsolidatedBook
std::string brief(const ConsolidatedBook &book)
Book brief info.
std::string toStr(const ConsolidatedBook &book)
Serializes book.
std::string toFormattedStr(const ConsolidatedBook &book)
Serializes book in formatted form.
UInt8 MbpBookDepth
Market by price order book depth type.
Definition: MbpBookTraits.h:28
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:152
ONIXS_CMEMDH_EXPORTED void consolidate(ConsolidatedBook &, const DirectBook &, const ImpliedBook &)
Serves as a factory for book of given type.
Definition: MbpBook.h:332
MbpBookFactory< ConsolidatedPriceLevel, MbpBookDepth > ConsolidatedBookFactory
Factory for consolidated books.
#define ONIXS_CMEMDH_NAMESPACE_END
Definition: Bootstrap.h:156