ITCHCPP 1.6.0
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
itch Namespace Reference

Namespaces

namespace  analytics
 
namespace  book
 
namespace  detail
 
namespace  indicators
 
namespace  io
 
namespace  overlay
 
namespace  transport
 
namespace  utils
 
namespace  venue
 

Classes

struct  AddOrderMessage
 Add Order, No MPID Attribution (A): a new displayable order has been accepted and placed on the book. More...
 
struct  AddOrderMPIDAttributionMessage
 Add Order, With MPID Attribution (F): like Add Order, but attributed to a market participant. More...
 
class  BasicPrice
 A strongly typed fixed-point price carrying its own decimal scale. More...
 
struct  BrokenTradeMessage
 Broken Trade (B): a previously disseminated execution has been broken and should be removed from any trade record. More...
 
struct  CrossTradeMessage
 Cross Trade (Q): the result of a cross (opening, closing, halt/IPO cross) for a security. More...
 
struct  DLCRMessage
 Direct Listing with Capital Raise Price Discovery (O): price-discovery data for a Direct Listing with a Capital Raise (DLCR) security. More...
 
struct  IPOQuotingPeriodUpdateMessage
 IPO Quoting Period Update (K): the anticipated IPO quotation release time and price for a security. More...
 
class  LimitOrderBook
 Manages the state of a limit order book for a specific financial instrument. More...
 
struct  LULDAuctionCollarMessage
 LULD Auction Collar (J): the auction collar thresholds for a security in a Limit-Up Limit-Down trading pause. More...
 
struct  MarketParticipantPositionMessage
 Market Participant Position (L): a market participant's (market maker's) status in a security. More...
 
struct  MWCBDeclineLevelMessage
 MWCB Decline Level (V): the Market-Wide Circuit Breaker breach points for the day. More...
 
struct  MWCBStatusMessage
 MWCB Status (W): notification that a Market-Wide Circuit Breaker level has been breached. More...
 
struct  NOIIMessage
 Net Order Imbalance Indicator (I): the imbalance and price-discovery data disseminated during the opening and closing crosses. More...
 
struct  NonCrossTradeMessage
 Trade, Non-Cross (P): an execution of a non-displayable order. More...
 
struct  OperationalHaltMessage
 Operational Halt (h): an operational halt or resumption for a security on a specific market center. More...
 
struct  Order
 Represents a single resting order within the Limit Order Book. More...
 
struct  OrderCancelMessage
 Order Cancel (X): a partial cancellation reduced the shares of a resting order. More...
 
struct  OrderDeleteMessage
 Order Delete (D): a resting order was cancelled in its entirety and removed from the book. More...
 
struct  OrderExecutedMessage
 Order Executed (E): a resting order was executed in whole or in part at its display price. More...
 
struct  OrderExecutedWithPriceMessage
 Order Executed With Price (C): a resting order was executed at a price different from its display price (and may be non-printable). More...
 
struct  OrderReplaceMessage
 Order Replace (U): a resting order was replaced with a new order at a new reference number, size, and/or price (same side and security). More...
 
class  Parser
 A high-performance parser for the NASDAQ TotalView-ITCH 5.0 protocol. More...
 
struct  PriceLevel
 Represents a specific price node in the order book. More...
 
struct  RegSHOMessage
 Reg SHO Short Sale Price Test Restriction (Y): the Reg SHO short-sale restriction state for a security. More...
 
class  ReplayEngine
 Replays a parsed ITCH stream paced by message timestamps. More...
 
struct  RetailPriceImprovementIndicatorMessage
 Retail Price Improvement Indicator (N): the presence of retail price improvement interest on the bid, the offer, or both. More...
 
struct  StockDirectoryMessage
 Stock Directory (R): the trading and listing reference data for a security, disseminated at the start of each trading day. More...
 
struct  StockTradingActionMessage
 Stock Trading Action (H): a change in the trading status of a security (halted, paused, quotation-only, or trading). More...
 
struct  SystemEventMessage
 System Event (S): signals a market or data-feed handler event. More...
 
struct  Trade
 A single execution extracted from the feed (the "trade tape"). More...
 

Typedefs

using Message = 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 >
 A variant able to hold any one of the ITCH 5.0 message structs.
 
using OrderIt = std::list< std::shared_ptr< Order > >::iterator
 Iterator type for navigating the list of orders within a price level.
 
using MessageCallback = std::function< void(const Message &)>
 The signature for the callback function used in streaming parse methods.
 
using ErrorCallback = std::function< void(ParseError, char)>
 The signature for the optional diagnostics callback.
 
using StandardPrice = BasicPrice< std::uint32_t, 4 >
 Price scale for every ITCH price field except MWCB decline levels.
 
using MwcbPrice = BasicPrice< std::uint64_t, 8 >
 Price scale for MWCB decline-level prices (8 implied decimals).
 
using TradeCallback = std::function< void(const Trade &)>
 Callback invoked for each extracted trade.
 
using ItchTimePoint = std::chrono::sys_time< std::chrono::nanoseconds >
 A system-clock time point at nanosecond resolution.
 
using RPIMsg = RetailPriceImprovementIndicatorMessage
 

Enumerations

enum class  ParseError { truncated , unknown_type , size_mismatch }
 Categories of recoverable problems encountered while framing a feed. More...
 

Functions

auto encode_message (const Message &message) -> std::vector< std::byte >
 Encodes a message body and header without the 2-byte length prefix.
 
auto encode_frame (const Message &message) -> std::vector< std::byte >
 Encodes a complete length-prefixed frame (2-byte big-endian length followed by the message bytes), ready to concatenate into a stream.
 
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.
 
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 overload for whichever alternative of Message it is given.
 
auto print_impl (std::ostream &out, const StockDirectoryMessage &msg) -> void
 
auto print_impl (std::ostream &out, const StockTradingActionMessage &msg) -> void
 
auto print_impl (std::ostream &out, const RegSHOMessage &msg) -> void
 
auto print_impl (std::ostream &out, const MarketParticipantPositionMessage &msg) -> void
 
auto print_impl (std::ostream &out, const MWCBDeclineLevelMessage &msg) -> void
 
auto print_impl (std::ostream &out, const MWCBStatusMessage &msg) -> void
 
auto print_impl (std::ostream &out, const IPOQuotingPeriodUpdateMessage &msg) -> void
 
auto print_impl (std::ostream &out, const LULDAuctionCollarMessage &msg) -> void
 
auto print_impl (std::ostream &out, const OperationalHaltMessage &msg) -> void
 
auto print_impl (std::ostream &out, const AddOrderMessage &msg) -> void
 
auto print_impl (std::ostream &out, const AddOrderMPIDAttributionMessage &msg) -> void
 
auto print_impl (std::ostream &out, const OrderExecutedMessage &msg) -> void
 
auto print_impl (std::ostream &out, const OrderExecutedWithPriceMessage &msg) -> void
 
auto print_impl (std::ostream &out, const OrderCancelMessage &msg) -> void
 
auto print_impl (std::ostream &out, const OrderDeleteMessage &msg) -> void
 
auto print_impl (std::ostream &out, const OrderReplaceMessage &msg) -> void
 
auto print_impl (std::ostream &out, const NonCrossTradeMessage &msg) -> void
 
auto print_impl (std::ostream &out, const CrossTradeMessage &msg) -> void
 
auto print_impl (std::ostream &out, const BrokenTradeMessage &msg) -> void
 
auto print_impl (std::ostream &out, const NOIIMessage &msg) -> void
 
auto print_impl (std::ostream &out, const RetailPriceImprovementIndicatorMessage &msg) -> void
 
auto print_impl (std::ostream &out, const DLCRMessage &msg) -> void
 
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 representation to out.
 
auto operator<< (std::ostream &out, const Message &msg) -> std::ostream &
 Streams a formatted representation of msg to out.
 
constexpr auto make_price (std::uint32_t raw_value) noexcept -> StandardPrice
 Wraps a raw 4-decimal price value in the typed StandardPrice.
 
constexpr auto make_mwcb_price (std::uint64_t raw_value) noexcept -> MwcbPrice
 Wraps a raw 8-decimal MWCB price value in the typed MwcbPrice.
 
constexpr auto to_time_point (std::chrono::year_month_day session_date, std::uint64_t nanos_past_midnight) noexcept -> ItchTimePoint
 Combines a session date with an ITCH timestamp into a time point.
 
auto format_timestamp (std::uint64_t nanos_past_midnight) -> std::string
 Formats a raw ITCH timestamp as a time-of-day string.
 
auto format_time_point (std::chrono::year_month_day session_date, std::uint64_t nanos_past_midnight) -> std::string
 Formats a session date plus an ITCH timestamp as a full date-time.
 
auto unpack_message (SystemEventMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (StockDirectoryMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (StockTradingActionMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (RegSHOMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (MarketParticipantPositionMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (MWCBDeclineLevelMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (MWCBStatusMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (IPOQuotingPeriodUpdateMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (LULDAuctionCollarMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (OperationalHaltMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (AddOrderMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (AddOrderMPIDAttributionMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (OrderExecutedMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (OrderExecutedWithPriceMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (OrderCancelMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (OrderDeleteMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (OrderReplaceMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (NonCrossTradeMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (CrossTradeMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (BrokenTradeMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (NOIIMessage &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (RPIMsg &msg, const char *buffer, size_t &offset) -> void
 
auto unpack_message (DLCRMessage &msg, const char *buffer, size_t &offset) -> void
 
static auto read_stream_into_buffer (std::istream &data) -> std::vector< char >
 

Variables

constexpr int STOCK_LEN = 8
 
constexpr double PRICE_DIVISOR = 10000.0
 
constexpr double MWCB_PRICE_DIVISOR = 1.0E8
 
constexpr size_t average_message_size = 20
 

Typedef Documentation

◆ Message

A variant able to hold any one of the ITCH 5.0 message structs.

The Message Type byte at the start of each frame identifies which struct is active. All alternatives share four common attributes: message_type (a single letter identifying the message), timestamp (nanoseconds past midnight), stock_locate (locate code identifying the security), and tracking_number (Nasdaq internal tracking number). For more details on each message type, see the documentation.

Note
Prices are integers fields supplied with an associated precision. When converted to a decimal format, prices are in fixed point format, where the precision defines the number of decimal places. For example, a field flagged as Price (4) has an implied 4 decimal places. The maximum value of price (4) in TotalView ITCH is 200,000.0000 (decimal, 77359400 hex). price_precision is 4 for all messages except MWCBDeclineLeveMessage where price_precision is 8.

Definition at line 460 of file messages.hpp.

◆ OrderIt

using itch::OrderIt = typedef std::list<std::shared_ptr<Order> >::iterator

Iterator type for navigating the list of orders within a price level.

Definition at line 60 of file order_book.hpp.

◆ MessageCallback

using itch::MessageCallback = typedef std::function<void(const Message&)>

The signature for the callback function used in streaming parse methods.

Parameters
constMessage& A const reference to the fully parsed message object.

Definition at line 40 of file parser.hpp.

◆ ErrorCallback

using itch::ErrorCallback = typedef std::function<void(ParseError, char)>

The signature for the optional diagnostics callback.

Parameters
ParseErrorThe category of problem that occurred.
charThe offending message type byte (‘’\0'` when not applicable, e.g. for a truncated header).

Definition at line 58 of file parser.hpp.

◆ StandardPrice

using itch::StandardPrice = typedef BasicPrice<std::uint32_t, 4>

Price scale for every ITCH price field except MWCB decline levels.

Definition at line 102 of file price.hpp.

◆ MwcbPrice

using itch::MwcbPrice = typedef BasicPrice<std::uint64_t, 8>

Price scale for MWCB decline-level prices (8 implied decimals).

Definition at line 105 of file price.hpp.

◆ TradeCallback

using itch::TradeCallback = typedef std::function<void(const Trade&)>

Callback invoked for each extracted trade.

Definition at line 42 of file tape.hpp.

◆ ItchTimePoint

using itch::ItchTimePoint = typedef std::chrono::sys_time<std::chrono::nanoseconds>

A system-clock time point at nanosecond resolution.

Definition at line 21 of file time.hpp.

◆ RPIMsg

Definition at line 214 of file parser.cpp.

Enumeration Type Documentation

◆ ParseError

enum class itch::ParseError
strong

Categories of recoverable problems encountered while framing a feed.

These are surfaced through the non-throwing try_parse entry points and the optional error callback, so callers can react without relying on exceptions or on the library writing to a global stream.

Enumerator
truncated 

The buffer ended in the middle of a frame.

unknown_type 

The message type byte does not correspond to a known message.

size_mismatch 

The declared length is shorter than the message type requires.

Definition at line 47 of file parser.hpp.

Function Documentation

◆ encode_message()

auto itch::encode_message ( const Message message) -> std::vector<std::byte>

Encodes a message body and header without the 2-byte length prefix.

Parameters
messageThe parsed message to encode.
Returns
The raw message bytes (type byte first), exactly as they appear inside a frame.

Definition at line 227 of file encoder.cpp.

Referenced by encode_frame().

◆ encode_frame()

auto itch::encode_frame ( const Message message) -> std::vector<std::byte>

Encodes a complete length-prefixed frame (2-byte big-endian length followed by the message bytes), ready to concatenate into a stream.

Parameters
messageThe parsed message to encode.
Returns
The length-prefixed frame bytes, ready to append to a stream.

Definition at line 239 of file encoder.cpp.

References encode_message().

◆ to_string()

auto itch::to_string ( const char *  source,
size_t  size 
) -> std::string
inline

Converts a fixed-width character array to a string, trimming trailing spaces and NUL characters.

Parameters
sourcePointer to the first character of the fixed-width field.
sizeNumber of characters in the field.
Returns
The trimmed string, with trailing spaces and NUL characters removed.

Definition at line 495 of file messages.hpp.

Referenced by itch::analytics::make_imbalance_info(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), print_impl(), and itch::analytics::AuctionTracker::process().

◆ print_impl() [1/23]

auto itch::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 overload for whichever alternative of Message it is given.

One overload of print_impl exists for every message struct defined above. Each overload writes a human-readable, field-by-field representation of its message to out.

Parameters
outThe output stream to write to.
msgThe message to format.

Definition at line 5 of file messages.cpp.

Referenced by print_message().

◆ print_impl() [2/23]

auto itch::print_impl ( std::ostream &  out,
const StockDirectoryMessage msg 
) -> void

Definition at line 11 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [3/23]

auto itch::print_impl ( std::ostream &  out,
const StockTradingActionMessage msg 
) -> void

Definition at line 17 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [4/23]

auto itch::print_impl ( std::ostream &  out,
const RegSHOMessage msg 
) -> void

Definition at line 24 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [5/23]

auto itch::print_impl ( std::ostream &  out,
const MarketParticipantPositionMessage msg 
) -> void

Definition at line 30 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [6/23]

auto itch::print_impl ( std::ostream &  out,
const MWCBDeclineLevelMessage msg 
) -> void

Definition at line 37 of file messages.cpp.

References MWCB_PRICE_DIVISOR.

◆ print_impl() [7/23]

auto itch::print_impl ( std::ostream &  out,
const MWCBStatusMessage msg 
) -> void

Definition at line 43 of file messages.cpp.

◆ print_impl() [8/23]

auto itch::print_impl ( std::ostream &  out,
const IPOQuotingPeriodUpdateMessage msg 
) -> void

Definition at line 49 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [9/23]

auto itch::print_impl ( std::ostream &  out,
const LULDAuctionCollarMessage msg 
) -> void

Definition at line 55 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [10/23]

auto itch::print_impl ( std::ostream &  out,
const OperationalHaltMessage msg 
) -> void

Definition at line 61 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [11/23]

auto itch::print_impl ( std::ostream &  out,
const AddOrderMessage msg 
) -> void

Definition at line 67 of file messages.cpp.

References PRICE_DIVISOR, STOCK_LEN, and to_string().

◆ print_impl() [12/23]

auto itch::print_impl ( std::ostream &  out,
const AddOrderMPIDAttributionMessage msg 
) -> void

Definition at line 76 of file messages.cpp.

References PRICE_DIVISOR, STOCK_LEN, and to_string().

◆ print_impl() [13/23]

auto itch::print_impl ( std::ostream &  out,
const OrderExecutedMessage msg 
) -> void

Definition at line 86 of file messages.cpp.

◆ print_impl() [14/23]

auto itch::print_impl ( std::ostream &  out,
const OrderExecutedWithPriceMessage msg 
) -> void

Definition at line 93 of file messages.cpp.

References PRICE_DIVISOR.

◆ print_impl() [15/23]

auto itch::print_impl ( std::ostream &  out,
const OrderCancelMessage msg 
) -> void

Definition at line 100 of file messages.cpp.

◆ print_impl() [16/23]

auto itch::print_impl ( std::ostream &  out,
const OrderDeleteMessage msg 
) -> void

Definition at line 107 of file messages.cpp.

◆ print_impl() [17/23]

auto itch::print_impl ( std::ostream &  out,
const OrderReplaceMessage msg 
) -> void

Definition at line 113 of file messages.cpp.

References PRICE_DIVISOR.

◆ print_impl() [18/23]

auto itch::print_impl ( std::ostream &  out,
const NonCrossTradeMessage msg 
) -> void

Definition at line 122 of file messages.cpp.

References PRICE_DIVISOR, STOCK_LEN, and to_string().

◆ print_impl() [19/23]

auto itch::print_impl ( std::ostream &  out,
const CrossTradeMessage msg 
) -> void

Definition at line 131 of file messages.cpp.

References PRICE_DIVISOR, STOCK_LEN, and to_string().

◆ print_impl() [20/23]

auto itch::print_impl ( std::ostream &  out,
const BrokenTradeMessage msg 
) -> void

Definition at line 141 of file messages.cpp.

◆ print_impl() [21/23]

auto itch::print_impl ( std::ostream &  out,
const NOIIMessage msg 
) -> void

Definition at line 147 of file messages.cpp.

References PRICE_DIVISOR, STOCK_LEN, and to_string().

◆ print_impl() [22/23]

auto itch::print_impl ( std::ostream &  out,
const RetailPriceImprovementIndicatorMessage msg 
) -> void

Definition at line 161 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_impl() [23/23]

auto itch::print_impl ( std::ostream &  out,
const DLCRMessage msg 
) -> void

Definition at line 167 of file messages.cpp.

References STOCK_LEN, and to_string().

◆ print_message()

auto itch::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 representation to out.

Parameters
outThe output stream to write to.
msgThe message to format; the concrete type formatted is whichever alternative of the variant is currently held.

Definition at line 173 of file messages.cpp.

References print_impl().

Referenced by operator<<().

◆ operator<<()

auto itch::operator<< ( std::ostream &  out,
const Message msg 
) -> std::ostream&

Streams a formatted representation of msg to out.

Parameters
outThe output stream to write to.
msgThe message to format.
Returns
A reference to out, to allow chaining.

Definition at line 177 of file messages.cpp.

References print_message().

◆ make_price()

constexpr auto itch::make_price ( std::uint32_t  raw_value) -> StandardPrice
constexprnoexcept

Wraps a raw 4-decimal price value in the typed StandardPrice.

Parameters
raw_valueThe raw on-wire 4-decimal price.
Returns
The value wrapped as a StandardPrice.

Definition at line 111 of file price.hpp.

Referenced by itch::LimitOrderBook::print().

◆ make_mwcb_price()

constexpr auto itch::make_mwcb_price ( std::uint64_t  raw_value) -> MwcbPrice
constexprnoexcept

Wraps a raw 8-decimal MWCB price value in the typed MwcbPrice.

Parameters
raw_valueThe raw on-wire 8-decimal MWCB decline-level price.
Returns
The value wrapped as an MwcbPrice.

Definition at line 119 of file price.hpp.

◆ to_time_point()

constexpr auto itch::to_time_point ( std::chrono::year_month_day  session_date,
std::uint64_t  nanos_past_midnight 
) -> ItchTimePoint
constexprnoexcept

Combines a session date with an ITCH timestamp into a time point.

ITCH timestamps are raw nanoseconds elapsed since midnight, with no date or time-zone attached. This helper anchors that offset to the midnight of a caller-supplied session date. No time-zone conversion is performed: the result is expressed in the same frame as the date you pass in (pass a UTC date for a UTC result, an Eastern-time date for an Eastern result).

Parameters
session_dateThe calendar date whose midnight anchors the timestamp.
nanos_past_midnightThe raw ITCH timestamp (nanoseconds past midnight).
Returns
The absolute time point for the event.

Definition at line 34 of file time.hpp.

Referenced by format_time_point().

◆ format_timestamp()

auto itch::format_timestamp ( std::uint64_t  nanos_past_midnight) -> std::string
inline

Formats a raw ITCH timestamp as a time-of-day string.

Parameters
nanos_past_midnightThe raw ITCH timestamp (nanoseconds past midnight).
Returns
A string of the form "HH:MM:SS.nnnnnnnnn".

Definition at line 44 of file time.hpp.

◆ format_time_point()

auto itch::format_time_point ( std::chrono::year_month_day  session_date,
std::uint64_t  nanos_past_midnight 
) -> std::string
inline

Formats a session date plus an ITCH timestamp as a full date-time.

Parameters
session_dateThe calendar date whose midnight anchors the timestamp.
nanos_past_midnightThe raw ITCH timestamp (nanoseconds past midnight).
Returns
A string of the form "YYYY-MM-DD HH:MM:SS.nnnnnnnnn".

Definition at line 54 of file time.hpp.

References to_time_point().

◆ unpack_message() [1/23]

auto itch::unpack_message ( SystemEventMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 51 of file parser.cpp.

◆ unpack_message() [2/23]

auto itch::unpack_message ( StockDirectoryMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 55 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [3/23]

auto itch::unpack_message ( StockTradingActionMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 73 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [4/23]

auto itch::unpack_message ( RegSHOMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 80 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [5/23]

auto itch::unpack_message ( MarketParticipantPositionMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 85 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [6/23]

auto itch::unpack_message ( MWCBDeclineLevelMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 94 of file parser.cpp.

◆ unpack_message() [7/23]

auto itch::unpack_message ( MWCBStatusMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 100 of file parser.cpp.

◆ unpack_message() [8/23]

auto itch::unpack_message ( IPOQuotingPeriodUpdateMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 104 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [9/23]

auto itch::unpack_message ( LULDAuctionCollarMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 112 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [10/23]

auto itch::unpack_message ( OperationalHaltMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 120 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [11/23]

auto itch::unpack_message ( AddOrderMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 126 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [12/23]

auto itch::unpack_message ( AddOrderMPIDAttributionMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 134 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [13/23]

auto itch::unpack_message ( OrderExecutedMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 145 of file parser.cpp.

◆ unpack_message() [14/23]

auto itch::unpack_message ( OrderExecutedWithPriceMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 151 of file parser.cpp.

◆ unpack_message() [15/23]

auto itch::unpack_message ( OrderCancelMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 160 of file parser.cpp.

◆ unpack_message() [16/23]

auto itch::unpack_message ( OrderDeleteMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 165 of file parser.cpp.

◆ unpack_message() [17/23]

auto itch::unpack_message ( OrderReplaceMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 169 of file parser.cpp.

◆ unpack_message() [18/23]

auto itch::unpack_message ( NonCrossTradeMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 176 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [19/23]

auto itch::unpack_message ( CrossTradeMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 187 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [20/23]

auto itch::unpack_message ( BrokenTradeMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 196 of file parser.cpp.

◆ unpack_message() [21/23]

auto itch::unpack_message ( NOIIMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 200 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [22/23]

auto itch::unpack_message ( RPIMsg msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 215 of file parser.cpp.

References STOCK_LEN.

◆ unpack_message() [23/23]

auto itch::unpack_message ( DLCRMessage msg,
const char *  buffer,
size_t &  offset 
) -> void

Definition at line 220 of file parser.cpp.

References STOCK_LEN.

◆ read_stream_into_buffer()

static auto itch::read_stream_into_buffer ( std::istream &  data) -> std::vector<char>
static

Definition at line 429 of file parser.cpp.

Referenced by itch::Parser::parse(), itch::Parser::parse(), and itch::Parser::parse().

Variable Documentation

◆ STOCK_LEN

◆ PRICE_DIVISOR

constexpr double itch::PRICE_DIVISOR = 10000.0
constexpr

◆ MWCB_PRICE_DIVISOR

constexpr double itch::MWCB_PRICE_DIVISOR = 1.0E8
constexpr

Definition at line 487 of file messages.hpp.

Referenced by print_impl().

◆ average_message_size

constexpr size_t itch::average_message_size = 20
constexpr

Definition at line 349 of file parser.cpp.

Referenced by itch::Parser::parse(), and itch::Parser::parse().