JayBeams
0.1
Another project to have fun coding.
|
Contains classes and functions to parse NASDAQ ITCH-5.0 messages, more information about ITCH-5.0 can be found at: http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NQTVITCHSpecification.pdf. More...
Namespaces | |
defaults | |
Default the default values for ITCH-5.x configuation. | |
detail | |
mold_udp_protocol | |
MoldUDP64 protocol constants. | |
protocol | |
ITCH-5.x protocol constants. | |
testing | |
Functions used in testing jb::itch5 entities. | |
Classes | |
struct | add_order_message |
Represent an 'Add Order' message in the ITCH-5.0 protocol. More... | |
struct | add_order_mpid_message |
Represent an 'Add Order with MPID' message in the ITCH-5.0 protocol. More... | |
class | array_based_book_side |
Represent one side of the book. More... | |
struct | array_based_order_book |
Define the types of buy and sell side classes. More... | |
struct | book_update |
A flat struct to represent updates to an order book. More... | |
struct | broken_trade_message |
Represent an 'Broken Trade / Order Execution' message in the ITCH-5.0 protocol. More... | |
class | char_list_field |
A helper type to define char fields with a limited set of values. More... | |
struct | char_list_validator |
Define a functor to validate character fields with limited values. More... | |
struct | char_list_validator< true > |
Specialize for the empty list. More... | |
struct | char_list_validator< true, a, V... > |
Recursively define the validator for the enabled case. More... | |
class | compute_book |
Compute the book and call a user-defined callback on each change. More... | |
struct | cross_trade_message |
Represent an 'Add Order' message in the ITCH-5.0 protocol. More... | |
struct | decoder |
Define the interface to decode ITCH-5.0 messages and message fields. More... | |
struct | decoder< V, add_order_message > |
Specialize decoder for a jb::itch5::add_order_message. More... | |
struct | decoder< V, add_order_mpid_message > |
Specialize decoder for a jb::itch5::add_order_mpid_message. More... | |
struct | decoder< V, broken_trade_message > |
Specialize decoder for a jb::itch5::broken_trade_message. More... | |
struct | decoder< V, cross_trade_message > |
Specialize decoder for a jb::itch5::cross_trade_message. More... | |
struct | decoder< V, ipo_quoting_period_update_message > |
Specialize decoder for a jb::itch5::ipo_quoting_period_update_message. More... | |
struct | decoder< V, market_participant_position_message > |
Specialize decoder for a jb::itch5::market_participant_position_message. More... | |
struct | decoder< V, mwcb_breach_message > |
Specialize decoder for a jb::itch5::mwcb_breach_message. More... | |
struct | decoder< V, mwcb_decline_level_message > |
Specialize decoder for a jb::itch5::mwcb_decline_level_message. More... | |
struct | decoder< V, net_order_imbalance_indicator_message > |
Specialize decoder for a jb::itch5::net_order_imbalance_indicator_message. More... | |
struct | decoder< V, order_cancel_message > |
Specialize decoder for a jb::itch5::order_cancel_message. More... | |
struct | decoder< V, order_delete_message > |
Specialize decoder for a jb::itch5::order_delete_message. More... | |
struct | decoder< V, order_executed_message > |
Specialize decoder for a jb::itch5::order_executed_message. More... | |
struct | decoder< V, order_executed_price_message > |
Specialize decoder for a jb::itch5::order_executed_price_message. More... | |
struct | decoder< V, order_replace_message > |
Specialize decoder for a jb::itch5::order_replace_message. More... | |
struct | decoder< V, reg_sho_restriction_message > |
Specialize decoder for a jb::itch5::reg_sho_restriction_message. More... | |
struct | decoder< V, stock_directory_message > |
Specialize decoder for a jb::itch5::stock_directory_message. More... | |
struct | decoder< V, stock_trading_action_message > |
Specialize decoder for a jb::itch5::stock_trading_action_message. More... | |
struct | decoder< V, trade_message > |
Specialize decoder for a jb::itch5::trade_message. More... | |
struct | decoder< validate, char_list_field< V... > > |
Specialize decoder<bool,T> for char_list_field. More... | |
struct | decoder< validate, message_header > |
Specialize decoder for a jb::itch5::message_header. More... | |
struct | decoder< validate, price_field< wire_type_t, denom_v > > |
Specialize jb::itch5::decoder for jb::itch5::price_field. More... | |
struct | decoder< validate, seconds_field > |
Specialize jb::itch5::decoder<> for a seconds_field. More... | |
struct | decoder< validate, short_string_field< wsize, F > > |
Specialize decoder<bool,T> for short_string_field. More... | |
struct | decoder< validate, std::uint16_t > |
Specialize jb::itch5::decoder for 2-byte integer fields. More... | |
struct | decoder< validate, std::uint32_t > |
Specialize jb::itch5::decoder for 4-byte integer fields. More... | |
struct | decoder< validate, std::uint64_t > |
Specialize jb::itch5::decoder for 4-byte integer fields. More... | |
struct | decoder< validate, std::uint8_t > |
Specialize jb::itch5::decoder for 1-byte integer (or character) fields. More... | |
struct | decoder< validate, system_event_message > |
Specialize decoder for a jb::itch5::system_event_message. More... | |
struct | decoder< validate, timestamp > |
Specialize jb::itch5::decoder<> for a timestamp. More... | |
struct | encoder |
TODO(#19) all this code should be replaced with Boost.Endian. More... | |
struct | encoder< validate, std::uint16_t > |
Specialize jb::itch5::encoder for 2-byte integer fields. More... | |
struct | encoder< validate, std::uint32_t > |
Specialize jb::itch5::encoder for 4-byte integer fields. More... | |
struct | encoder< validate, std::uint64_t > |
Specialize jb::itch5::encoder for 4-byte integer fields. More... | |
struct | encoder< validate, std::uint8_t > |
Specialize jb::itch5::encoder for 1-byte integer (or character) fields. More... | |
struct | encoder< validate, timestamp > |
Specialize jb::itch5::encoder<> for a timestamp. More... | |
struct | ipo_quoting_period_update_message |
Represent a 'IPO Quotation Release Update' message in the ITCH-5.0 protocol. More... | |
class | map_based_book_side |
Represent one side of the book. More... | |
struct | map_based_order_book |
Define the types of buy and sell sides data structure. More... | |
struct | market_participant_position_message |
Represent a 'Market Participant Position' message in the ITCH-5.0 protocol. More... | |
class | message_handler_concept |
The interface for message_handlers in jb::itch5::process_iostream. More... | |
class | mold_udp_channel |
Create and manage a socket to receive MoldUDP64 packets. More... | |
struct | mold_udp_channel_tester |
Break encapsulation in jb::itch5::mold_udp_channel for testing purposes. More... | |
class | mold_udp_pacer |
Send a sequence of raw ITCH-5.x messages as MoldUDP64 packets, trying to match the original time interval between messages. More... | |
class | mold_udp_pacer_config |
Configuration object for the jb::itch5::mold_udp_pacer class. More... | |
struct | mwcb_breach_message |
Represent a 'MWCB Breach' message in the ITCH-5.0 protocol. More... | |
struct | mwcb_decline_level_message |
Represent a 'MWCB Decline Level' message in the ITCH-5.0 protocol. More... | |
struct | net_order_imbalance_indicator_message |
Represent an 'Net Order Imbalance Indicator' message in the ITCH-5.0 protocol. More... | |
struct | noop_validator |
A validator functor that accepts all values. More... | |
class | order_book |
Maintain the ITCH-5.0 order book for a single security. More... | |
struct | order_cancel_message |
Represent an 'Order Cancel' message in the ITCH-5.0 protocol. More... | |
struct | order_data |
A convenient container for per-order data. More... | |
struct | order_delete_message |
Represent an 'Order Delete' message in the ITCH-5.0 protocol. More... | |
struct | order_executed_message |
Represent an 'Order Executed' message in the ITCH-5.0 protocol. More... | |
struct | order_executed_price_message |
Represent an 'Order Executed with Price' message in the ITCH-5.0 protocol. More... | |
struct | order_replace_message |
Represent an 'Order Replace' message in the ITCH-5.0 protocol. More... | |
class | price_field |
Define a class used to represent prices in the ITCH-5.0 feed. More... | |
class | process_buffer_mlist |
Process a buffer with a single message: parse it and call the handler. More... | |
class | process_buffer_mlist< message_handler > |
Partial specialization for an empty list of messages. More... | |
class | process_buffer_mlist< message_handler, head_t, tail_t... > |
Partial specialization for a list with at least one message. More... | |
struct | reg_sho_restriction_message |
Represent a 'Reg SHO Restriction' message in the ITCH-5.0 protocol. More... | |
class | seconds_field |
Represent a ITCH-5.0 seconds_field. More... | |
class | short_string_field |
A helper type to define short (and fixed sized) string fields. More... | |
struct | stock_directory_message |
Represent a 'Stock Directory' message in the ITCH-5.0 protocol. More... | |
struct | stock_trading_action_message |
Represent a 'Stock Trading Action' message in the ITCH-5.0 protocol. More... | |
struct | system_event_message |
Represent a 'System Event Message' in the ITCH-5.0 protocol. More... | |
struct | timestamp |
Represent a ITCH-5.0 timestamp. More... | |
struct | trade_message |
Represent an 'Trade (non-Cross)' message in the ITCH-5.0 protocol. More... | |
class | udp_config_common |
Common configuration parameters for both UDP senders and receivers. More... | |
class | udp_receiver_config |
A configuration object for UDP receivers. More... | |
class | udp_sender_config |
A configuration object for UDP senders. More... | |
class | unknown_message |
A simple. More... | |
struct | validate_issue_subtype |
A functor to validate the 'Issue Sub-Type' field. More... | |
Typedefs | |
typedef char_list_field< u 'S', u 'B'> | buy_sell_indicator_t |
Represent the 'Buy/Sell Indicator' field on several messages. More... | |
using | clock_type = std::chrono::steady_clock |
A convenience alias for clock_type. More... | |
using | time_point = clock_type::time_point |
A convenience alias for clock_type::time_point. More... | |
typedef char_list_field< u 'O', u 'C', u 'H', u 'I'> | cross_type_t |
Represent the 'Cross Type' field on 'Cross Trade' and 'Net Order Imbalance Indicator' messages. More... | |
typedef char_list_field< u 'A', u 'C'> | ipo_quotation_release_qualifier_t |
Represent the 'IPO Quotation Release Qualifier' field on a 'IPO Quoting Period Update' message. More... | |
typedef char_list_field< u 'Y', u 'N'> | primary_market_maker_t |
Represent the 'Primary Market Maker' field on a 'Market Participant Position' message. More... | |
typedef char_list_field< u 'N', u 'P', u 'S', u 'R', u 'L' > | market_maker_mode_t |
Represent the 'Market Maker Mode' field in a 'Market Participant Position' message. More... | |
typedef char_list_field< u 'A', u 'E', u 'W', u 'S', u 'D' > | market_participant_state_t |
Represent the 'Market Participant State' field in a 'Market Participant Position' message. More... | |
typedef jb::itch5::short_string_field< 4 > | mpid_t |
Define the type used to represent the 'MPID' field in many messages. More... | |
typedef char_list_field< u '1', u '2', u '3'> | breached_level_t |
Represent the 'Breached Level' field in the 'MWCB Breach Message'. More... | |
typedef char_list_field< u 'B', u 'S', u 'N', u 'O'> | imbalance_direction_t |
Represent the 'Imbalance Direction' field in the 'Net order Imbalance Indicator' message. More... | |
typedef char_list_field< u 'L', u '1', u '2', u '3', u '4', u '5', u '6', u '7', u '8', u '9', u 'A', u 'B', u 'C', u' '> | price_variation_indicator_t |
Represent the 'Price Variation Indicator' field in the 'Net Order Imbalance Indicator' message. More... | |
using | book_depth_t = unsigned long int |
Number of prices on a side order book. More... | |
typedef char_list_field< u 'Y', u 'N'> | printable_t |
Represent the 'Printable' field on a 'Order Executed with Price' message. More... | |
typedef price_field< std::uint32_t, 10000 > | price4_t |
Convenience definition for Price(4) fields. More... | |
typedef price_field< std::uint64_t, 100000000 > | price8_t |
Convenience definition for Price(8) fields. More... | |
using | half_quote = std::pair< price4_t, int > |
A simple representation for price + quantity. More... | |
typedef char_list_field< u '0', u '1', u '2'> | reg_sho_action_t |
Represent the 'Reg SHO Action' field of the 'Reg SHO Restriction' message. More... | |
typedef char_list_field< u 'Q', u 'G', u 'S', u 'N', u 'A', u 'P', u 'Z', u' ' > | market_category_t |
Represent the 'Market Category' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'D', u 'E', u 'Q', u 'S', u 'G', u 'H', u 'J', u 'K', u 'C', u 'N', u' ' > | financial_status_indicator_t |
Represent the 'Financial Status Indicator' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'Y', u 'N'> | roundlots_only_t |
Represent the 'Round Lots Only' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'A', u 'B', u 'C', u 'F', u 'I', u 'L', u 'N', u 'O', u 'P', u 'Q', u 'R', u 'S', u 'T', u 'U', u 'V', u 'W' > | issue_classification_t |
Represent the 'Issue Classification' field on a 'Stock Directory' message. More... | |
typedef short_string_field< 2, validate_issue_subtype > | issue_subtype_t |
Represent the 'Issue Sub-Type' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'P', u 'T' > | authenticity_t |
Represent the 'Authenticity' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'Y', u 'N', u' '> | short_sale_threshold_indicator_t |
Represent the 'Short Sale Threshold Indicator' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'Y', u 'N', u' '> | ipo_flag_t |
Represent the 'IPO Flag' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u '1', u '2', u' '> | luld_reference_price_tier_t |
Represent the 'LULD Reference Price Tier' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'Y', u 'N', u' '> | etp_flag_t |
Represent the 'ETP Flag' field on a 'Stock Directory' message. More... | |
typedef char_list_field< u 'Y', u 'N'> | inverse_indicator_t |
Represent the 'Inverse Indicator' field on a 'Stock Directory' message. More... | |
typedef jb::itch5::short_string_field< 8 > | stock_t |
Define the type used to represent the 'Stock' field in many messages. More... | |
typedef char_list_field< u 'H', u 'P', u 'Q', u 'T'> | trading_state_t |
Represent the 'Trading State' field on a 'Stock Trading Action' message. More... | |
typedef short_string_field< 4 > | reason_t |
Represent the 'Reason' field in a 'Stock Trading Action' message. More... | |
typedef char_list_field< u 'O', u 'S', u 'Q', u 'M', u 'E', u 'C'> | event_code_t |
Represent the 'Event Code' field on a 'System Event Message'. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &os, add_order_message const &x) |
Streaming operator for jb::itch5::add_order_message. More... | |
std::ostream & | operator<< (std::ostream &os, add_order_mpid_message const &x) |
Streaming operator for jb::itch5::add_order_mpid_message. More... | |
std::ostream & | operator<< (std::ostream &os, broken_trade_message const &x) |
Streaming operator for jb::itch5::broken_trade_message. More... | |
template<int... V> | |
std::ostream & | operator<< (std::ostream &os, char_list_field< V... > const &x) |
Streaming operator for jb::itch5::char_list_field<> More... | |
void | char_list_validation_failed (int x) |
Helper function, raises an exception describing a mismatched value. More... | |
template<bool validate> | |
void | check_offset (char const *msg, std::size_t size, std::size_t offset, std::size_t n) |
Verify that an offset and field length is valid (generic version). More... | |
template<> | |
void | check_offset< true > (char const *msg, std::size_t size, std::size_t offset, std::size_t n) |
A version of jb::itch5::check_offset<> that actually validates. More... | |
void | raise_validation_failed (char const *where, char const *what) |
Convenience function to raise an exception upon a validation error. More... | |
bool | operator== (book_update const &a, book_update const &b) |
bool | operator!= (book_update const &a, book_update const &b) |
std::ostream & | operator<< (std::ostream &os, book_update const &x) |
std::ostream & | operator<< (std::ostream &os, order_data const &x) |
std::ostream & | operator<< (std::ostream &os, cross_trade_message const &x) |
Streaming operator for jb::itch5::cross_trade_message. More... | |
template<typename duration_t , typename book_type > | |
bool | record_latency_stats (jb::offline_feed_statistics &stats, jb::itch5::message_header const &header, jb::itch5::order_book< book_type > const &book, jb::itch5::book_update const &update, duration_t processing_latency) |
Determine if this event changes the inside, if so, record the statistics. More... | |
template<typename duration_t , typename book_type > | |
bool | generate_inside (jb::offline_feed_statistics &stats, std::ostream &out, jb::itch5::message_header const &header, jb::itch5::order_book< book_type > const &book, jb::itch5::book_update const &update, duration_t processing_latency) |
Determine if this event changes the inside, if so, record the statistics and output the result. More... | |
std::ostream & | operator<< (std::ostream &os, ipo_quoting_period_update_message const &x) |
Streaming operator for jb::itch5::ipo_quoting_period_update_message. More... | |
template<class socket_t = boost::asio::ip::udp::socket> | |
void | make_socket_udp_common (socket_t &s, udp_config_common const &cfg) |
Configure a UDP socket. More... | |
template<class socket_t = boost::asio::ip::udp::socket> | |
socket_t | make_socket_udp_recv (boost::asio::io_service &io, udp_receiver_config const &cfg) |
Create a socket given the configuration parameters. More... | |
template<class socket_t = boost::asio::ip::udp::socket> | |
socket_t | make_socket_udp_send (boost::asio::io_service &io, udp_sender_config const &cfg) |
Create a socket to send UDP messages given the configuration parameters. More... | |
std::ostream & | operator<< (std::ostream &os, market_participant_position_message const &x) |
Streaming operator for jb::itch5::market_participant_position_message. More... | |
std::ostream & | operator<< (std::ostream &os, message_header const &x) |
Streaming operator for jb::itch5::message_header. More... | |
std::ostream & | operator<< (std::ostream &os, mwcb_breach_message const &x) |
Streaming operator for jb::itch5::mwcb_breach_message. More... | |
std::ostream & | operator<< (std::ostream &os, mwcb_decline_level_message const &x) |
Streaming operator for jb::itch5::mwcb_decline_level_message. More... | |
std::ostream & | operator<< (std::ostream &os, net_order_imbalance_indicator_message const &x) |
Streaming operator for jb::itch5::net_order_imbalance_indicator_message. More... | |
std::ostream & | operator<< (std::ostream &os, order_cancel_message const &x) |
Streaming operator for jb::itch5::order_cancel_message. More... | |
std::ostream & | operator<< (std::ostream &os, order_delete_message const &x) |
Streaming operator for jb::itch5::order_delete_message. More... | |
std::ostream & | operator<< (std::ostream &os, order_executed_message const &x) |
Streaming operator for jb::itch5::order_executed_message. More... | |
std::ostream & | operator<< (std::ostream &os, order_executed_price_message const &x) |
Streaming operator for jb::itch5::order_executed_price_message. More... | |
std::ostream & | operator<< (std::ostream &os, order_replace_message const &x) |
Streaming operator for jb::itch5::order_replace_message. More... | |
template<typename wire_type_t , std::intmax_t denom_v> | |
std::ostream & | operator<< (std::ostream &os, price_field< wire_type_t, denom_v > const &x) |
Streaming operator for jb::itch5::price_field<> More... | |
template<typename price_field > | |
price_field | max_price_field_value () |
template<> | |
price4_t | max_price_field_value () |
template<typename price_field > | |
price_field | operator+ (price_field const &lhs, price_field const &rhs) |
non-member addition operator More... | |
template<typename price_field_t > | |
std::size_t | price_levels (price_field_t lo, price_field_t hi) |
Compute the number of price levels between two prices. More... | |
template<typename price_field_t > | |
auto | level_to_price (typename price_field_t::wire_type const p_level) |
Compute the absolute price of a price level. More... | |
template<typename message_handler > | |
void | process_iostream (std::istream &in, message_handler &handler) |
Process an iostream of ITCH-5.0 messages. More... | |
template<typename message_handler , typename... message_types> | |
void | process_iostream_mlist (std::istream &is, message_handler &handler) |
price4_t | empty_bid_price () |
convenient value to represent an empty bid limit price More... | |
price4_t | empty_offer_price () |
convenient value to represent an empty offer limit price More... | |
half_quote | empty_bid () |
The value used to represent an empty bid. More... | |
half_quote | empty_offer () |
The value used to represent an empty offer. More... | |
std::ostream & | operator<< (std::ostream &os, reg_sho_restriction_message const &x) |
Streaming operator for jb::itch5::reg_sho_restriction_message. More... | |
template<bool validate> | |
void | check_seconds_field_range (seconds_field const &t) |
Validate the a seconds_field value. More... | |
template<> | |
void | check_seconds_field_range< true > (seconds_field const &t) |
Provide an active implementation of jb::itch5::check_seconds_field_range<> More... | |
std::ostream & | operator<< (std::ostream &os, seconds_field const &x) |
Streaming operator for jb::itch5::seconds_field. More... | |
template<std::size_t size, typename F > | |
std::ostream & | operator<< (std::ostream &os, short_string_field< size, F > const &x) |
Streaming operator for jb::itch5::short_string_field<> More... | |
template<std::size_t size, typename F > | |
std::size_t | hash_value (short_string_field< size, F > const &x) |
Implement a hash function and integrate with boost::hash. More... | |
constexpr int | static_digits (std::intmax_t value) |
Compute (at compile time if possible) the number of digits in a number. More... | |
std::ostream & | operator<< (std::ostream &os, stock_directory_message const &x) |
Streaming operator for jb::itch5::stock_directory_message. More... | |
std::ostream & | operator<< (std::ostream &os, stock_trading_action_message const &x) |
Streaming operator for jb::itch5::stock_trading_action_message. More... | |
std::ostream & | operator<< (std::ostream &os, system_event_message const &x) |
Streaming operator for jb::itch5::system_event_message. More... | |
template<bool validate> | |
void | check_timestamp_range (timestamp const &t) |
Validate the a timestamp value. More... | |
template<> | |
void | check_timestamp_range< true > (timestamp const &t) |
Provide an active implementation of jb::itch5::check_timestamp_range<> More... | |
std::ostream & | operator<< (std::ostream &os, timestamp const &x) |
Streaming operator for jb::itch5::timestamp. More... | |
std::ostream & | operator<< (std::ostream &os, trade_message const &x) |
Streaming operator for jb::itch5::trade_message. More... | |
Contains classes and functions to parse NASDAQ ITCH-5.0 messages, more information about ITCH-5.0 can be found at: http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NQTVITCHSpecification.pdf.
struct jb::itch5::array_based_order_book |
Define the types of buy and sell side classes.
It is used as template parameter book_type of the template classes order_book and compute_book:
Definition at line 87 of file array_based_order_book.hpp.
Class Members | ||
---|---|---|
typedef array_based_book_side < greater< size_t > > |
buys_t | |
typedef array_based_book_side < less< size_t > > |
sells_t |
struct jb::itch5::book_update |
A flat struct to represent updates to an order book.
Updates to an order book come in many forms, but they can all be represented with a simple structure that shows: what book is being updated, what side of the book is being updated, what price level is being updated, and how many shares are being added or removed from the book.
Definition at line 39 of file compute_book.hpp.
Class Members | ||
---|---|---|
buy_sell_indicator_t | buy_sell_indicator | What side of the book is being updated. |
bool | cxlreplx | If true, this was a cancel replace and and old order was modified too... |
price4_t | oldpx | Old price for the order. |
int | oldqty | How many shares were removed in the old order. |
price4_t | px | What price level is being updated. |
int | qty | How many shares are being added (if positive) or removed (if negative) from the book. |
time_point | recvts | When was the message that triggered this update received. |
stock_t | stock |
The security updated by this order. This is redundant for order updates and deletes, and ITCH-5.0 omits the field, but we find it easier |
struct jb::itch5::map_based_order_book |
Define the types of buy and sell sides data structure.
It is used as template parameter book_type of the template class order_book:
Definition at line 26 of file map_based_order_book.hpp.
Class Members | ||
---|---|---|
typedef map_based_book_side < greater< price4_t > > |
buys_t | |
typedef map_based_book_side < less< price4_t > > |
sells_t |
struct jb::itch5::message_header |
Define the header common to all ITCH 5.0 messages.
Definition at line 15 of file message_header.hpp.
Class Members | ||
---|---|---|
int | message_type |
The type of message. ITCH-5.0 messages are identified by their first byte, with an ASCII value assigned to each message. offset=0 width=1 |
int | stock_locate |
The stock locate number. Every stock receives a unique number in an ITCH-5.0 session. For messages that are not stock specific, this value is 0. offset=1 width=2 |
timestamp | timestamp |
The message timestamp, in nanoseconds since midnight. All messages in a ITCH-5.0 session are timestamped, in nanoseconds since midnight for whatever day the session started running. All sessions are terminated before the end of the day. offset=5 width=6 |
int | tracking_number |
The "Tracking Number", a field designed for "internal NASDAQ purposes". The ITCH-5.0 specification does not document how this field is to be interpreted. offset=3 width=2 |
struct jb::itch5::order_data |
A convenient container for per-order data.
Most market data feeds resend the security identifier and side with each order update, but ITCH-5.0 does not. One needs to lookup the symbol, side, original price, information based on the order id. This literal type is used to keep that information around.
Definition at line 82 of file compute_book.hpp.
Class Members | ||
---|---|---|
buy_sell_indicator_t | buy_sell_indicator | Whether the order is a BUY or SELL. |
price4_t | px | The price of the order. |
int | qty | The remaining quantity in the order. |
stock_t | stock | The symbol for this particular order. |
class jb::itch5::process_buffer_mlist |
Process a buffer with a single message: parse it and call the handler.
As messages are received and broken down by jb::itch5::process_iostream_mlist() they need to be parsed and then the right member function on the message handler must be invoked. Two partial specializations of this class implement this functionality. The fully generic version is, in fact, not implemented and this is intentional.
We use a class instead of a standalone function because partial template specialization for functions is not allowed in C++11, though it is trivially simulated, as show here.
Please see jb::itch5::message_handler_concept for a detailed description of the message_handler requirements.
Definition at line 30 of file process_buffer_mlist.hpp.
struct jb::itch5::timestamp |
Represent a ITCH-5.0 timestamp.
ITCH-5.0 uses nanoseconds since midnight for its timestamps.
Definition at line 17 of file timestamp.hpp.
Class Members | ||
---|---|---|
nanoseconds | ts |
typedef char_list_field< u'P', u'T' > jb::itch5::authenticity_t |
Represent the 'Authenticity' field on a 'Stock Directory' message.
Definition at line 95 of file stock_directory_message.hpp.
using jb::itch5::book_depth_t = typedef unsigned long int |
Number of prices on a side order book.
Definition at line 17 of file order_book.hpp.
typedef char_list_field<u'1', u'2', u'3'> jb::itch5::breached_level_t |
Represent the 'Breached Level' field in the 'MWCB Breach Message'.
Definition at line 13 of file mwcb_breach_message.hpp.
typedef char_list_field<u'S', u'B'> jb::itch5::buy_sell_indicator_t |
Represent the 'Buy/Sell Indicator' field on several messages.
Definition at line 12 of file buy_sell_indicator.hpp.
using jb::itch5::clock_type = typedef std::chrono::steady_clock |
A convenience alias for clock_type.
Definition at line 25 of file compute_book.hpp.
typedef char_list_field<u'O', u'C', u'H', u'I'> jb::itch5::cross_type_t |
Represent the 'Cross Type' field on 'Cross Trade' and 'Net Order Imbalance Indicator' messages.
Definition at line 13 of file cross_type.hpp.
typedef char_list_field<u'Y', u'N', u' '> jb::itch5::etp_flag_t |
Represent the 'ETP Flag' field on a 'Stock Directory' message.
Definition at line 122 of file stock_directory_message.hpp.
Represent the 'Event Code' field on a 'System Event Message'.
Definition at line 22 of file system_event_message.hpp.
typedef char_list_field< u'D', u'E', u'Q', u'S', u'G', u'H', u'J', u'K', u'C', u'N', u' ' > jb::itch5::financial_status_indicator_t |
Represent the 'Financial Status Indicator' field on a 'Stock Directory' message.
Definition at line 44 of file stock_directory_message.hpp.
using jb::itch5::half_quote = typedef std::pair<price4_t, int> |
A simple representation for price + quantity.
Definition at line 10 of file quote_defaults.hpp.
typedef char_list_field<u'B', u'S', u'N', u'O'> jb::itch5::imbalance_direction_t |
Represent the 'Imbalance Direction' field in the 'Net order Imbalance Indicator' message.
Definition at line 16 of file net_order_imbalance_indicator_message.hpp.
typedef char_list_field<u'Y', u'N'> jb::itch5::inverse_indicator_t |
Represent the 'Inverse Indicator' field on a 'Stock Directory' message.
Definition at line 128 of file stock_directory_message.hpp.
typedef char_list_field<u'Y', u'N', u' '> jb::itch5::ipo_flag_t |
Represent the 'IPO Flag' field on a 'Stock Directory' message.
Definition at line 107 of file stock_directory_message.hpp.
typedef char_list_field<u'A', u'C'> jb::itch5::ipo_quotation_release_qualifier_t |
Represent the 'IPO Quotation Release Qualifier' field on a 'IPO Quoting Period Update' message.
Definition at line 17 of file ipo_quoting_period_update_message.hpp.
typedef char_list_field< u'A', u'B', u'C', u'F', u'I', u'L', u'N', u'O', u'P', u'Q', u'R', u'S', u'T', u'U', u'V', u'W' > jb::itch5::issue_classification_t |
Represent the 'Issue Classification' field on a 'Stock Directory' message.
Definition at line 74 of file stock_directory_message.hpp.
Represent the 'Issue Sub-Type' field on a 'Stock Directory' message.
Definition at line 85 of file stock_directory_message.hpp.
typedef char_list_field<u'1', u'2', u' '> jb::itch5::luld_reference_price_tier_t |
Represent the 'LULD Reference Price Tier' field on a 'Stock Directory' message.
LULD stands for 'Limit Up, Limit Down', a restriction on pricing to avoid sudden drops or increases in price.
Definition at line 116 of file stock_directory_message.hpp.
typedef char_list_field< u'Q', u'G', u'S', u'N', u'A', u'P', u'Z', u' ' > jb::itch5::market_category_t |
Represent the 'Market Category' field on a 'Stock Directory' message.
Definition at line 24 of file stock_directory_message.hpp.
typedef char_list_field< u'N', u'P', u'S', u'R', u'L' > jb::itch5::market_maker_mode_t |
Represent the 'Market Maker Mode' field in a 'Market Participant Position' message.
Definition at line 29 of file market_participant_position_message.hpp.
typedef char_list_field< u'A', u'E', u'W', u'S', u'D' > jb::itch5::market_participant_state_t |
Represent the 'Market Participant State' field in a 'Market Participant Position' message.
Definition at line 42 of file market_participant_position_message.hpp.
typedef jb::itch5::short_string_field<4> jb::itch5::mpid_t |
Define the type used to represent the 'MPID' field in many messages.
Some ITCH-5.0 messages need to include information about the Market Participant that the message refers to. For example, members of the NASDAQ exchange may chose to identify their orders instead of trading anonymously. In the NASDAQ exchange each participant receives a 4-letter (all uppercase) identifier.
Definition at line 19 of file mpid_field.hpp.
typedef price_field<std::uint32_t, 10000> jb::itch5::price4_t |
Convenience definition for Price(4) fields.
Definition at line 131 of file price_field.hpp.
typedef price_field<std::uint64_t, 100000000> jb::itch5::price8_t |
Convenience definition for Price(8) fields.
Definition at line 134 of file price_field.hpp.
typedef char_list_field< u'L', u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'A', u'B', u'C', u' '> jb::itch5::price_variation_indicator_t |
Represent the 'Price Variation Indicator' field in the 'Net Order Imbalance Indicator' message.
Definition at line 25 of file net_order_imbalance_indicator_message.hpp.
typedef char_list_field<u'Y', u'N'> jb::itch5::primary_market_maker_t |
Represent the 'Primary Market Maker' field on a 'Market Participant Position' message.
Definition at line 16 of file market_participant_position_message.hpp.
Represent the 'Printable' field on a 'Order Executed with Price' message.
Definition at line 17 of file order_executed_price_message.hpp.
typedef short_string_field<4> jb::itch5::reason_t |
Represent the 'Reason' field in a 'Stock Trading Action' message.
Definition at line 19 of file stock_trading_action_message.hpp.
typedef char_list_field<u'0', u'1', u'2'> jb::itch5::reg_sho_action_t |
Represent the 'Reg SHO Action' field of the 'Reg SHO Restriction' message.
Definition at line 15 of file reg_sho_restriction_message.hpp.
typedef char_list_field<u'Y', u'N'> jb::itch5::roundlots_only_t |
Represent the 'Round Lots Only' field on a 'Stock Directory' message.
Definition at line 50 of file stock_directory_message.hpp.
typedef char_list_field<u'Y', u'N', u' '> jb::itch5::short_sale_threshold_indicator_t |
Represent the 'Short Sale Threshold Indicator' field on a 'Stock Directory' message.
Definition at line 101 of file stock_directory_message.hpp.
typedef jb::itch5::short_string_field<8> jb::itch5::stock_t |
Define the type used to represent the 'Stock' field in many messages.
All the ITCH-5.0 messages that carry stock-specific information use an 8-byte alpha field to represent the stock symbol. Please see ITCH-5.0: Confused about Securities, Symbols, and Tickers for some commentary on NASDAQ's naming conventions.
Definition at line 18 of file stock_field.hpp.
using jb::itch5::time_point = typedef clock_type::time_point |
A convenience alias for clock_type::time_point.
Definition at line 28 of file compute_book.hpp.
typedef char_list_field<u'H', u'P', u'Q', u'T'> jb::itch5::trading_state_t |
Represent the 'Trading State' field on a 'Stock Trading Action' message.
Definition at line 14 of file stock_trading_action_message.hpp.
void jb::itch5::char_list_validation_failed | ( | int | x | ) |
Helper function, raises an exception describing a mismatched value.
Definition at line 6 of file char_list_validator.cpp.
Referenced by jb::itch5::char_list_validator< validate, V >::operator()(), and jb::itch5::char_list_validator< true >::operator()().
void jb::itch5::check_offset | ( | char const * | msg, |
std::size_t | size, | ||
std::size_t | offset, | ||
std::size_t | n | ||
) |
Verify that an offset and field length is valid (generic version).
validate | if true, actually validate the offset and length, otherwise this is a no-op. |
msg | a message to include in the exception (if any) raised when the validation fails. |
size | the size of the message |
offset | the offset into the message where we want to read data |
n | the size of the data we want to read |
std::runtime_error | if the validation fails. |
Definition at line 25 of file check_offset.hpp.
References check_offset< true >(), raise_validation_failed(), and jb::testing::defaults::size.
Referenced by BOOST_AUTO_TEST_CASE().
void jb::itch5::check_offset< true > | ( | char const * | msg, |
std::size_t | size, | ||
std::size_t | offset, | ||
std::size_t | n | ||
) |
A version of jb::itch5::check_offset<> that actually validates.
Definition at line 7 of file check_offset.cpp.
References jb::testing::defaults::size.
Referenced by BOOST_AUTO_TEST_CASE(), and check_offset().
void jb::itch5::check_seconds_field_range | ( | seconds_field const & | t | ) |
Validate the a seconds_field value.
In ITCH-5.0 messages the seconds_field represents nanoseconds since midnight. The protocol is designed to start new sessions at the beginning of each day, so seconds_fields cannot ever be more than 24 hours in nanoseconds.
validate | unless it is true the function is a no-op. |
std::runtime_error | if tparam is true and the seconds_field is out of the expected range. |
Definition at line 59 of file seconds_field.hpp.
References check_seconds_field_range< true >().
void jb::itch5::check_seconds_field_range< true > | ( | seconds_field const & | t | ) |
Provide an active implementation of jb::itch5::check_seconds_field_range<>
Definition at line 8 of file seconds_field.cpp.
Referenced by check_seconds_field_range().
void jb::itch5::check_timestamp_range | ( | timestamp const & | t | ) |
Validate the a timestamp value.
In ITCH-5.0 messages the timestamp represents nanoseconds since midnight. The protocol is designed to start new sessions at the beginning of each day, so timestamps cannot ever be more than 24 hours in nanoseconds.
validate | unless it is true the function is a no-op. |
std::runtime_error | if tparam is true and the timestamp is out of the expected range. |
Definition at line 35 of file timestamp.hpp.
References check_timestamp_range< true >().
void jb::itch5::check_timestamp_range< true > | ( | timestamp const & | t | ) |
Provide an active implementation of jb::itch5::check_timestamp_range<>
Definition at line 8 of file timestamp.cpp.
Referenced by check_timestamp_range().
|
inline |
The value used to represent an empty bid.
Definition at line 23 of file quote_defaults.hpp.
References empty_bid_price().
Referenced by jb::itch5::map_based_book_side< compare_t >::side< std::greater< price4_t >, DUMMY >::empty_quote(), jb::itch5::array_based_book_side< compare_t >::side< std::greater< std::size_t >, DUMMY >::empty_quote(), jb::itch5::testing::test_compute_book_add_order_message_sell(), jb::itch5::testing::test_compute_book_order_cancel_message(), jb::itch5::testing::test_compute_book_order_executed_message(), and jb::itch5::testing::test_compute_book_reduction_edge_cases().
|
inline |
convenient value to represent an empty bid limit price
Definition at line 13 of file quote_defaults.hpp.
Referenced by empty_bid(), and jb::itch5::array_based_book_side< compare_t >::side< std::greater< std::size_t >, DUMMY >::empty_quote_price().
|
inline |
The value used to represent an empty offer.
Definition at line 28 of file quote_defaults.hpp.
References empty_offer_price().
Referenced by jb::itch5::map_based_book_side< compare_t >::side< ordering, DUMMY >::empty_quote(), jb::itch5::array_based_book_side< compare_t >::side< ordering, DUMMY >::empty_quote(), jb::itch5::testing::test_compute_book_add_order_message_buy(), jb::itch5::testing::test_compute_book_order_cancel_message(), jb::itch5::testing::test_compute_book_order_executed_message(), jb::itch5::testing::test_compute_book_order_replace_message(), and jb::itch5::testing::test_compute_book_reduction_edge_cases().
|
inline |
convenient value to represent an empty offer limit price
Definition at line 18 of file quote_defaults.hpp.
Referenced by empty_offer(), jb::itch5::array_based_book_side< compare_t >::side< ordering, DUMMY >::empty_quote_price(), and jb::itch5::array_based_book_side< compare_t >::get_limits().
bool jb::itch5::generate_inside | ( | jb::offline_feed_statistics & | stats, |
std::ostream & | out, | ||
jb::itch5::message_header const & | header, | ||
jb::itch5::order_book< book_type > const & | book, | ||
jb::itch5::book_update const & | update, | ||
duration_t | processing_latency | ||
) |
Determine if this event changes the inside, if so, record the statistics and output the result.
duration_t | the type used to record the processing latency, must be compatible with a duration in the std::chrono sense. |
book_type | the type used to define order_book<book_type>, must be compatible with jb::itch5::map_price |
stats | where to record the statistics |
out | where to send the new inside quote if needed |
header | (unused) the header for the message that generated this book update |
book | the book updated |
update | a report of the changes to the book |
processing_latency | the time it took to process the event (before the any output is generated). |
Definition at line 78 of file generate_inside.hpp.
References jb::itch5::order_book< book_type >::best_bid(), jb::itch5::order_book< book_type >::best_offer(), record_latency_stats(), jb::itch5::book_update::stock, jb::itch5::message_header::stock_locate, jb::itch5::message_header::timestamp, and jb::itch5::timestamp::ts.
Referenced by main(), run_inside(), and jb::itch5::testing::test_generate_inside_basic().
std::size_t jb::itch5::hash_value | ( | short_string_field< size, F > const & | x | ) |
Implement a hash function and integrate with boost::hash.
Definition at line 185 of file short_string_field.hpp.
References jb::itch5::short_string_field< wire_size_value, value_validator >::c_str(), and jb::testing::defaults::size.
auto jb::itch5::level_to_price | ( | typename price_field_t::wire_type const | p_level | ) |
Compute the absolute price of a price level.
p_level | price level |
std::bad_range | if p_level out of range |
Definition at line 62 of file price_levels.hpp.
References price_levels().
void jb::itch5::make_socket_udp_common | ( | socket_t & | s, |
udp_config_common const & | cfg | ||
) |
Configure a UDP socket.
socket_t | the type of socket to create. The main reason to change this type is for dependency injection during testing. |
s | the socket to configure. |
cfg | the socket configuration. |
Definition at line 23 of file make_socket_udp_common.hpp.
References jb::debug, jb::itch5::udp_config_common::debug, jb::itch5::udp_config_common::do_not_route, jb::itch5::udp_config_common::linger, jb::itch5::udp_config_common::linger_seconds, jb::itch5::udp_config_common::receive_buffer_size, jb::itch5::udp_config_common::receive_low_watermark, jb::itch5::udp_config_common::send_buffer_size, and jb::itch5::udp_config_common::send_low_watermark.
Referenced by BOOST_AUTO_TEST_CASE(), make_socket_udp_recv(), and make_socket_udp_send().
socket_t jb::itch5::make_socket_udp_recv | ( | boost::asio::io_service & | io, |
udp_receiver_config const & | cfg | ||
) |
Create a socket given the configuration parameters.
This is a function to create (open) sockets to receive UDP messages, either unicast or multicast and either IPv4 or IPv6.
socket_t | the type of socket to create. The main reason to change this type is for dependency injection during testing. |
io | the Boost.ASIO io_service object that the socket is managed by. |
cfg | the configuration parameters for the socket. |
Definition at line 71 of file make_socket_udp_recv.hpp.
References make_socket_udp_common(), and jb::itch5::detail::setup_socket_udp_recv().
Referenced by BOOST_AUTO_TEST_CASE().
socket_t jb::itch5::make_socket_udp_send | ( | boost::asio::io_service & | io, |
udp_sender_config const & | cfg | ||
) |
Create a socket to send UDP messages given the configuration parameters.
This is a function to create (open) sockets to send UDP messages, either unicast or multicast and either IPv4 or IPv6. The socket is bound to ADDRANY, and uses an ephemeral port selected by the operating system. The address family (v4 vs. v6) is selected based on the destination address.
socket_t | the type of socket to create. The main reason to change this type is for dependency injection during testing. |
io | the Boost.ASIO io_service object that the socket is managed by. |
cfg | the socket configuration. |
Definition at line 89 of file make_socket_udp_send.hpp.
References make_socket_udp_common(), and jb::itch5::detail::setup_socket_udp_send().
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 137 of file price_field.hpp.
References jb::itch5::price_field< wire_type_t, denom_v >::denom, and jb::itch5::price_field< wire_type_t, denom_v >::price_field().
|
inline |
Definition at line 144 of file price_field.hpp.
References jb::itch5::price_field< std::uint32_t, 10000 >::denom.
|
inline |
Definition at line 511 of file compute_book.hpp.
|
inline |
non-member addition operator
Definition at line 151 of file price_field.hpp.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
broken_trade_message const & | x | ||
) |
Streaming operator for jb::itch5::broken_trade_message.
Definition at line 8 of file broken_trade_message.cpp.
References jb::itch5::broken_trade_message::header, and jb::itch5::broken_trade_message::match_number.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
order_delete_message const & | x | ||
) |
Streaming operator for jb::itch5::order_delete_message.
Definition at line 8 of file order_delete_message.cpp.
References jb::itch5::order_delete_message::header, and jb::itch5::order_delete_message::order_reference_number.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
order_cancel_message const & | x | ||
) |
Streaming operator for jb::itch5::order_cancel_message.
Definition at line 8 of file order_cancel_message.cpp.
References jb::itch5::order_cancel_message::canceled_shares, jb::itch5::order_cancel_message::header, and jb::itch5::order_cancel_message::order_reference_number.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
order_executed_message const & | x | ||
) |
Streaming operator for jb::itch5::order_executed_message.
Definition at line 8 of file order_executed_message.cpp.
References jb::itch5::order_executed_message::executed_shares, jb::itch5::order_executed_message::header, jb::itch5::order_executed_message::match_number, and jb::itch5::order_executed_message::order_reference_number.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
reg_sho_restriction_message const & | x | ||
) |
Streaming operator for jb::itch5::reg_sho_restriction_message.
Definition at line 8 of file reg_sho_restriction_message.cpp.
References jb::itch5::reg_sho_restriction_message::header, jb::itch5::reg_sho_restriction_message::reg_sho_action, and jb::itch5::reg_sho_restriction_message::stock.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
mwcb_decline_level_message const & | x | ||
) |
Streaming operator for jb::itch5::mwcb_decline_level_message.
Definition at line 8 of file mwcb_decline_level_message.cpp.
References jb::itch5::mwcb_decline_level_message::header, jb::itch5::mwcb_decline_level_message::level_1, jb::itch5::mwcb_decline_level_message::level_2, and jb::itch5::mwcb_decline_level_message::level_3.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
mwcb_breach_message const & | x | ||
) |
Streaming operator for jb::itch5::mwcb_breach_message.
Definition at line 8 of file mwcb_breach_message.cpp.
References jb::itch5::mwcb_breach_message::breached_level, and jb::itch5::mwcb_breach_message::header.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
cross_trade_message const & | x | ||
) |
Streaming operator for jb::itch5::cross_trade_message.
Definition at line 8 of file cross_trade_message.cpp.
References jb::itch5::cross_trade_message::cross_price, jb::itch5::cross_trade_message::cross_type, jb::itch5::cross_trade_message::header, jb::itch5::cross_trade_message::match_number, jb::itch5::cross_trade_message::shares, and jb::itch5::cross_trade_message::stock.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
order_replace_message const & | x | ||
) |
Streaming operator for jb::itch5::order_replace_message.
Definition at line 8 of file order_replace_message.cpp.
References jb::itch5::order_replace_message::header, jb::itch5::order_replace_message::new_order_reference_number, jb::itch5::order_replace_message::original_order_reference_number, jb::itch5::order_replace_message::price, and jb::itch5::order_replace_message::shares.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
add_order_message const & | x | ||
) |
Streaming operator for jb::itch5::add_order_message.
Definition at line 8 of file add_order_message.cpp.
References jb::itch5::add_order_message::buy_sell_indicator, jb::itch5::add_order_message::header, jb::itch5::add_order_message::order_reference_number, jb::itch5::add_order_message::price, jb::itch5::add_order_message::shares, and jb::itch5::add_order_message::stock.
Referenced by jb::itch5::validate_issue_subtype::operator()(), jb::itch5::decoder< V, order_delete_message >::r(), jb::itch5::decoder< V, order_cancel_message >::r(), jb::itch5::decoder< V, broken_trade_message >::r(), jb::itch5::decoder< V, order_executed_message >::r(), jb::itch5::decoder< V, order_replace_message >::r(), jb::itch5::decoder< V, cross_trade_message >::r(), jb::itch5::decoder< V, trade_message >::r(), jb::itch5::decoder< V, add_order_message >::r(), jb::itch5::decoder< V, mwcb_decline_level_message >::r(), jb::itch5::decoder< V, reg_sho_restriction_message >::r(), jb::itch5::decoder< V, mwcb_breach_message >::r(), jb::itch5::decoder< V, ipo_quoting_period_update_message >::r(), jb::itch5::decoder< V, stock_trading_action_message >::r(), jb::itch5::decoder< validate, system_event_message >::r(), jb::itch5::decoder< V, add_order_mpid_message >::r(), jb::itch5::decoder< V, net_order_imbalance_indicator_message >::r(), jb::itch5::decoder< V, order_executed_price_message >::r(), jb::itch5::decoder< V, market_participant_position_message >::r(), jb::itch5::decoder< validate, message_header >::r(), jb::itch5::decoder< validate, seconds_field >::r(), jb::itch5::decoder< V, stock_directory_message >::r(), and jb::itch5::encoder< validate, timestamp >::w().
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
trade_message const & | x | ||
) |
Streaming operator for jb::itch5::trade_message.
Definition at line 7 of file trade_message.cpp.
References jb::itch5::trade_message::buy_sell_indicator, jb::itch5::trade_message::header, jb::itch5::trade_message::match_number, jb::itch5::trade_message::order_reference_number, jb::itch5::trade_message::price, jb::itch5::trade_message::shares, and jb::itch5::trade_message::stock.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
system_event_message const & | x | ||
) |
Streaming operator for jb::itch5::system_event_message.
Definition at line 8 of file system_event_message.cpp.
References jb::itch5::system_event_message::event_code, and jb::itch5::system_event_message::header.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
stock_trading_action_message const & | x | ||
) |
Streaming operator for jb::itch5::stock_trading_action_message.
Definition at line 8 of file stock_trading_action_message.cpp.
References jb::itch5::stock_trading_action_message::header, jb::itch5::stock_trading_action_message::reason, jb::itch5::stock_trading_action_message::reserved, jb::itch5::stock_trading_action_message::stock, and jb::itch5::stock_trading_action_message::trading_state.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
ipo_quoting_period_update_message const & | x | ||
) |
Streaming operator for jb::itch5::ipo_quoting_period_update_message.
Definition at line 8 of file ipo_quoting_period_update_message.cpp.
References jb::itch5::ipo_quoting_period_update_message::header, jb::itch5::ipo_quoting_period_update_message::ipo_price, jb::itch5::ipo_quoting_period_update_message::ipo_quotation_release_qualifier, jb::itch5::ipo_quoting_period_update_message::ipo_quotation_release_time, and jb::itch5::ipo_quoting_period_update_message::stock.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
add_order_mpid_message const & | x | ||
) |
Streaming operator for jb::itch5::add_order_mpid_message.
Definition at line 8 of file add_order_mpid_message.cpp.
References jb::itch5::add_order_mpid_message::attribution.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
order_executed_price_message const & | x | ||
) |
Streaming operator for jb::itch5::order_executed_price_message.
Definition at line 8 of file order_executed_price_message.cpp.
References jb::itch5::order_executed_price_message::execution_price, and jb::itch5::order_executed_price_message::printable.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
net_order_imbalance_indicator_message const & | x | ||
) |
Streaming operator for jb::itch5::net_order_imbalance_indicator_message.
Definition at line 8 of file net_order_imbalance_indicator_message.cpp.
References jb::itch5::net_order_imbalance_indicator_message::cross_type, jb::itch5::net_order_imbalance_indicator_message::current_reference_price, jb::itch5::net_order_imbalance_indicator_message::far_price, jb::itch5::net_order_imbalance_indicator_message::header, jb::itch5::net_order_imbalance_indicator_message::imbalance_direction, jb::itch5::net_order_imbalance_indicator_message::imbalance_shares, jb::itch5::net_order_imbalance_indicator_message::near_price, jb::itch5::net_order_imbalance_indicator_message::paired_shares, jb::itch5::net_order_imbalance_indicator_message::price_variation_indicator, and jb::itch5::net_order_imbalance_indicator_message::stock.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
message_header const & | x | ||
) |
Streaming operator for jb::itch5::message_header.
Definition at line 6 of file message_header.cpp.
References jb::itch5::message_header::message_type, jb::itch5::message_header::stock_locate, jb::itch5::message_header::timestamp, and jb::itch5::message_header::tracking_number.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
timestamp const & | x | ||
) |
Streaming operator for jb::itch5::timestamp.
Definition at line 21 of file timestamp.cpp.
References jb::itch5::timestamp::ts.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
market_participant_position_message const & | x | ||
) |
Streaming operator for jb::itch5::market_participant_position_message.
Definition at line 8 of file market_participant_position_message.cpp.
References jb::itch5::market_participant_position_message::header, jb::itch5::market_participant_position_message::market_maker_mode, jb::itch5::market_participant_position_message::market_participant_state, jb::itch5::market_participant_position_message::mpid, jb::itch5::market_participant_position_message::primary_market_maker, and jb::itch5::market_participant_position_message::stock.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
seconds_field const & | x | ||
) |
Streaming operator for jb::itch5::seconds_field.
Definition at line 20 of file seconds_field.cpp.
References jb::itch5::seconds_field::int_seconds().
std::ostream& jb::itch5::operator<< | ( | std::ostream & | os, |
char_list_field< V... > const & | x | ||
) |
Streaming operator for jb::itch5::char_list_field<>
Definition at line 94 of file char_list_field.hpp.
References jb::itch5::char_list_field< V >::as_int().
std::ostream& jb::itch5::operator<< | ( | std::ostream & | os, |
price_field< wire_type_t, denom_v > const & | x | ||
) |
Streaming operator for jb::itch5::price_field<>
Definition at line 123 of file price_field.hpp.
std::ostream& jb::itch5::operator<< | ( | std::ostream & | os, |
short_string_field< size, F > const & | x | ||
) |
Streaming operator for jb::itch5::short_string_field<>
Definition at line 179 of file short_string_field.hpp.
std::ostream & jb::itch5::operator<< | ( | std::ostream & | os, |
stock_directory_message const & | x | ||
) |
Streaming operator for jb::itch5::stock_directory_message.
Definition at line 26 of file stock_directory_message.cpp.
References jb::itch5::stock_directory_message::authenticity, jb::itch5::stock_directory_message::etp_flag, jb::itch5::stock_directory_message::etp_leverage_factor, jb::itch5::stock_directory_message::financial_status_indicator, jb::itch5::stock_directory_message::header, jb::itch5::stock_directory_message::inverse_indicator, jb::itch5::stock_directory_message::ipo_flag, jb::itch5::stock_directory_message::issue_classification, jb::itch5::stock_directory_message::issue_subtype, jb::itch5::stock_directory_message::luld_reference_price_tier, jb::itch5::stock_directory_message::market_category, jb::itch5::stock_directory_message::round_lot_size, jb::itch5::stock_directory_message::roundlots_only, jb::itch5::stock_directory_message::short_sale_threshold_indicator, and jb::itch5::stock_directory_message::stock.
std::ostream& jb::itch5::operator<< | ( | std::ostream & | os, |
book_update const & | x | ||
) |
Definition at line 515 of file compute_book.hpp.
References jb::itch5::book_update::buy_sell_indicator, jb::itch5::book_update::px, jb::itch5::book_update::qty, and jb::itch5::book_update::stock.
std::ostream& jb::itch5::operator<< | ( | std::ostream & | os, |
order_data const & | x | ||
) |
Definition at line 520 of file compute_book.hpp.
References jb::itch5::order_data::buy_sell_indicator, jb::itch5::order_data::px, jb::itch5::order_data::qty, and jb::itch5::order_data::stock.
|
inline |
Definition at line 505 of file compute_book.hpp.
References jb::itch5::book_update::buy_sell_indicator, jb::itch5::book_update::px, jb::itch5::book_update::qty, jb::itch5::book_update::recvts, and jb::itch5::book_update::stock.
Referenced by BOOST_AUTO_TEST_CASE().
std::size_t jb::itch5::price_levels | ( | price_field_t | lo, |
price_field_t | hi | ||
) |
Compute the number of price levels between two prices.
lo | the low end of the range of price levels |
hi | the hi end of the range of price levels |
std::bad_range | if hi < lo |
Definition at line 20 of file price_levels.hpp.
Referenced by jb::itch5::array_based_book_side< compare_t >::add_order(), jb::itch5::array_based_book_side< compare_t >::get_limits(), level_to_price(), jb::itch5::array_based_book_side< compare_t >::price_levels_empty_quote(), and jb::itch5::array_based_book_side< compare_t >::reduce_order().
void jb::itch5::process_iostream | ( | std::istream & | in, |
message_handler & | handler | ||
) |
Process an iostream of ITCH-5.0 messages.
This is just a wrapper around jb::itch5::process_iostream_mlist() using all the messages in ITCH-5.0 as the allowed message list.
Please see jb::itch5::message_handler_concept for a detailed description of the message_handler requirements.
Definition at line 56 of file process_iostream.hpp.
Referenced by main(), and run_inside().
void jb::itch5::process_iostream_mlist | ( | std::istream & | is, |
message_handler & | handler | ||
) |
Definition at line 28 of file process_iostream_mlist.hpp.
References jb::error, JB_LOG, and jb::itch5::decoder< validate, T >::r().
Referenced by BOOST_AUTO_TEST_CASE().
void jb::itch5::raise_validation_failed | ( | char const * | where, |
char const * | what | ||
) |
Convenience function to raise an exception upon a validation error.
std::runtime_error |
where | a string representing what class, function or component detected the problem. |
what | a string representing what value or expression failed its validation. |
Definition at line 18 of file check_offset.cpp.
Referenced by check_offset(), and jb::itch5::short_string_field< 8 >::validate().
bool jb::itch5::record_latency_stats | ( | jb::offline_feed_statistics & | stats, |
jb::itch5::message_header const & | header, | ||
jb::itch5::order_book< book_type > const & | book, | ||
jb::itch5::book_update const & | update, | ||
duration_t | processing_latency | ||
) |
Determine if this event changes the inside, if so, record the statistics.
duration_t | the type used to record the processing latency, must be compatible with a duration in the std::chrono sense. |
book_type | the type used to define the book type, order_book<book_type>, must be compatible with jb::itch5::map_price. |
stats | where to record the statistics |
header | (unused) the header for the message that generated this book update |
book | the book updated |
update | a report of the changes to the book |
processing_latency | the time it took to process the event (before the any output is generated). |
Definition at line 31 of file generate_inside.hpp.
References jb::itch5::order_book< book_type >::best_bid(), jb::itch5::order_book< book_type >::best_offer(), jb::itch5::book_update::buy_sell_indicator, jb::itch5::book_update::cxlreplx, jb::itch5::book_update::oldpx, jb::itch5::book_update::px, jb::offline_feed_statistics::sample(), jb::itch5::message_header::timestamp, and jb::itch5::timestamp::ts.
Referenced by generate_inside().
constexpr int jb::itch5::static_digits | ( | std::intmax_t | value | ) |
Compute (at compile time if possible) the number of digits in a number.
Definition at line 11 of file static_digits.hpp.
Referenced by BOOST_AUTO_TEST_CASE().