JayBeams  0.1
Another project to have fun coding.
mwcb_decline_level_message.hpp
Go to the documentation of this file.
1 #ifndef jb_itch5_mwcb_decline_level_message_hpp
2 #define jb_itch5_mwcb_decline_level_message_hpp
3 
6 
7 namespace jb {
8 namespace itch5 {
9 
10 /**
11  * Represent a 'MWCB Decline Level' message in the ITCH-5.0 protocol.
12  *
13  * The Market Wide Circuit Breakers (MWCB) are a mechanism to halt
14  * trading if the market declines to such a level that some error is
15  * reasonably suspected. The mechanism defines three different
16  * levels, with different consequences at each level.
17  */
19  constexpr static int message_type = u'V';
20 
25 };
26 
27 /// Specialize decoder for a jb::itch5::mwcb_decline_level_message
28 template <bool V>
30  /// Please see the generic documentation for jb::itch5::decoder<>::r()
32  r(std::size_t size, void const* buf, std::size_t off) {
34  x.header = decoder<V, message_header>::r(size, buf, off + 0);
35  x.level_1 = decoder<V, price8_t>::r(size, buf, off + 11);
36  x.level_2 = decoder<V, price8_t>::r(size, buf, off + 19);
37  x.level_3 = decoder<V, price8_t>::r(size, buf, off + 27);
38  return x;
39  }
40 };
41 
42 /// Streaming operator for jb::itch5::mwcb_decline_level_message.
43 std::ostream& operator<<(std::ostream& os, mwcb_decline_level_message const& x);
44 
45 } // namespace itch5
46 } // namespace jb
47 
48 #endif // jb_itch5_mwcb_decline_level_message_hpp
Define the header common to all ITCH 5.0 messages.
static T r(std::size_t size, void const *msg, std::size_t offset)
Read a single message or field.
Define the interface to decode ITCH-5.0 messages and message fields.
Definition: decoder.hpp:24
std::ostream & operator<<(std::ostream &os, add_order_message const &x)
Streaming operator for jb::itch5::add_order_message.
static mwcb_decline_level_message r(std::size_t size, void const *buf, std::size_t off)
Please see the generic documentation for jb::itch5::decoder<>::r()
Represent a &#39;MWCB Decline Level&#39; message in the ITCH-5.0 protocol.
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7