6 out <<
"System Event:\n"
7 <<
" Timestamp: " << msg.timestamp <<
"\n"
8 <<
" Event Code: " << msg.event_code;
12 out <<
"Stock Directory:\n"
13 <<
" Timestamp: " << msg.timestamp <<
"\n"
18 out <<
"Stock Trading Action:\n"
19 <<
" Timestamp: " << msg.timestamp <<
"\n"
21 <<
" State: " << msg.trading_state;
25 out <<
"Reg SHO Message:\n"
26 <<
" Timestamp: " << msg.timestamp <<
"\n"
31 out <<
"Market Participant Position:\n"
32 <<
" Timestamp: " << msg.timestamp <<
"\n"
33 <<
" MPID: " <<
to_string(msg.mpid, 4) <<
"\n"
38 out <<
"MWCB Decline Level:\n"
39 <<
" Timestamp: " << msg.timestamp <<
"\n"
44 out <<
"MWCB Status:\n"
45 <<
" Timestamp: " << msg.timestamp <<
"\n"
46 <<
" Level: " << msg.breached_level;
50 out <<
"IPO Quoting Period Update:\n"
51 <<
" Timestamp: " << msg.timestamp <<
"\n"
56 out <<
"LULD Auction Collar:\n"
57 <<
" Timestamp: " << msg.timestamp <<
"\n"
62 out <<
"Operational Halt:\n"
63 <<
" Timestamp: " << msg.timestamp <<
"\n"
69 <<
" Timestamp: " << msg.timestamp <<
"\n"
71 <<
" Side: " << msg.buy_sell_indicator <<
"\n"
72 <<
" Shares: " << msg.shares <<
"\n"
77 out <<
"Add Order (MPID):\n"
78 <<
" Timestamp: " << msg.timestamp <<
"\n"
80 <<
" MPID: " <<
to_string(msg.attribution, 4) <<
"\n"
81 <<
" Side: " << msg.buy_sell_indicator <<
"\n"
82 <<
" Shares: " << msg.shares <<
"\n"
87 out <<
"Order Executed:\n"
88 <<
" Timestamp: " << msg.timestamp <<
"\n"
89 <<
" Ref#: " << msg.order_reference_number <<
"\n"
90 <<
" Shares: " << msg.executed_shares;
94 out <<
"Order Executed w/ Price:\n"
95 <<
" Timestamp: " << msg.timestamp <<
"\n"
96 <<
" Ref#: " << msg.order_reference_number <<
"\n"
101 out <<
"Order Cancel:\n"
102 <<
" Timestamp: " << msg.timestamp <<
"\n"
103 <<
" Ref#: " << msg.order_reference_number <<
"\n"
104 <<
" Cancelled Shares: " << msg.cancelled_shares;
108 out <<
"Order Delete:\n"
109 <<
" Timestamp: " << msg.timestamp <<
"\n"
110 <<
" Ref#: " << msg.order_reference_number;
114 out <<
"Order Replace:\n"
115 <<
" Timestamp: " << msg.timestamp <<
"\n"
116 <<
" Original Ref#: " << msg.original_order_reference_number <<
"\n"
117 <<
" New Ref#: " << msg.new_order_reference_number <<
"\n"
118 <<
" Shares: " << msg.shares <<
"\n"
123 out <<
"Non-Cross Trade:\n"
124 <<
" Timestamp: " << msg.timestamp <<
"\n"
126 <<
" Side: " << msg.buy_sell_indicator <<
"\n"
127 <<
" Shares: " << msg.shares <<
"\n"
132 out <<
"Cross Trade:\n"
133 <<
" Timestamp: " << msg.timestamp <<
"\n"
135 <<
" Shares: " << msg.shares <<
"\n"
136 <<
" Cross Price: " << msg.cross_price /
PRICE_DIVISOR <<
"\n"
137 <<
" Match#: " << msg.match_number <<
"\n"
138 <<
" Cross Type: " << msg.cross_type;
142 out <<
"Broken Trade:\n"
143 <<
" Timestamp: " << msg.timestamp <<
"\n"
144 <<
" Match#: " << msg.match_number;
148 out <<
"NOII Message:\n"
149 <<
" Timestamp: " << msg.timestamp <<
"\n"
151 <<
" Paired Shares: " << msg.paired_shares <<
"\n"
152 <<
" Imbalance Shares: " << msg.imbalance_shares <<
"\n"
153 <<
" Imbalance Direction: " << msg.imbalance_direction <<
"\n"
156 <<
" Reference Price: " << msg.current_reference_price /
PRICE_DIVISOR <<
"\n"
157 <<
" Cross Type: " << msg.cross_type <<
"\n"
158 <<
" Price Variation Indicator: " << msg.price_variation_indicator;
162 out <<
"RPII Message:\n"
163 <<
" Timestamp: " << msg.timestamp <<
"\n"
168 out <<
"DLCR Message:\n"
169 <<
" Timestamp: " << msg.timestamp <<
"\n"
174 std::visit([&out](
auto&& arg) {
print_impl(out, arg); }, msg);
Defines every ITCH 5.0 message struct, the Message variant, and the stream-printing helpers used to f...
constexpr double PRICE_DIVISOR
std::variant< SystemEventMessage, StockDirectoryMessage, StockTradingActionMessage, RegSHOMessage, MarketParticipantPositionMessage, MWCBDeclineLevelMessage, MWCBStatusMessage, IPOQuotingPeriodUpdateMessage, LULDAuctionCollarMessage, OperationalHaltMessage, AddOrderMessage, AddOrderMPIDAttributionMessage, OrderExecutedMessage, OrderExecutedWithPriceMessage, OrderCancelMessage, OrderDeleteMessage, OrderReplaceMessage, NonCrossTradeMessage, CrossTradeMessage, BrokenTradeMessage, NOIIMessage, RetailPriceImprovementIndicatorMessage, DLCRMessage > Message
A variant able to hold any one of the ITCH 5.0 message structs.
auto print_message(std::ostream &out, const Message &msg) -> void
Dispatches to the print_impl overload matching the active alternative of msg and writes its formatted...
auto operator<<(std::ostream &out, const Message &msg) -> std::ostream &
Streams a formatted representation of msg to out.
auto to_string(const char *source, size_t size) -> std::string
Converts a fixed-width character array to a string, trimming trailing spaces and NUL characters.
constexpr double MWCB_PRICE_DIVISOR
auto print_impl(std::ostream &out, const SystemEventMessage &msg) -> void
Per-message-type stream formatter family, used internally by print_message to dispatch to the correct...
Add Order, With MPID Attribution (F): like Add Order, but attributed to a market participant.
Add Order, No MPID Attribution (A): a new displayable order has been accepted and placed on the book.
Broken Trade (B): a previously disseminated execution has been broken and should be removed from any ...
Cross Trade (Q): the result of a cross (opening, closing, halt/IPO cross) for a security.
Direct Listing with Capital Raise Price Discovery (O): price-discovery data for a Direct Listing with...
IPO Quoting Period Update (K): the anticipated IPO quotation release time and price for a security.
LULD Auction Collar (J): the auction collar thresholds for a security in a Limit-Up Limit-Down tradin...
MWCB Decline Level (V): the Market-Wide Circuit Breaker breach points for the day.
MWCB Status (W): notification that a Market-Wide Circuit Breaker level has been breached.
Market Participant Position (L): a market participant's (market maker's) status in a security.
Net Order Imbalance Indicator (I): the imbalance and price-discovery data disseminated during the ope...
Trade, Non-Cross (P): an execution of a non-displayable order.
Operational Halt (h): an operational halt or resumption for a security on a specific market center.
Order Cancel (X): a partial cancellation reduced the shares of a resting order.
Order Delete (D): a resting order was cancelled in its entirety and removed from the book.
Order Executed (E): a resting order was executed in whole or in part at its display price.
Order Executed With Price (C): a resting order was executed at a price different from its display pri...
Order Replace (U): a resting order was replaced with a new order at a new reference number,...
Reg SHO Short Sale Price Test Restriction (Y): the Reg SHO short-sale restriction state for a securit...
Retail Price Improvement Indicator (N): the presence of retail price improvement interest on the bid,...
Stock Directory (R): the trading and listing reference data for a security, disseminated at the start...
Stock Trading Action (H): a change in the trading status of a security (halted, paused,...
System Event (S): signals a market or data-feed handler event.