JayBeams  0.1
Another project to have fun coding.
Classes | Functions
jb::pitch2 Namespace Reference

Classes

struct  add_order_message
 Represent the 'Add Order' message in the PITCH-2.X protocol. More...
 
struct  auction_update_message
 Represent the 'Auction Update' message in the PITCH-2.X protocol. More...
 
struct  base_add_order_message
 Common type for the 'Add Order' messages in the PITCH-2.X protocol. More...
 
struct  delete_order_message
 Represent the 'Delete Order' message in the PITCH-2.X protocol. More...
 
struct  expanded_add_order_message
 Represent the 'Add Order' message in the PITCH-2.X protocol. More...
 
struct  modify_long_message
 Represent the 'Modify (long)' messages in the PITCH-2.X protocol. More...
 
struct  modify_message
 Represent the 'Modify' messages in the PITCH-2.X protocol. More...
 
struct  modify_short_message
 Represent the 'Modify (short)' messages in the PITCH-2.X protocol. More...
 
struct  order_executed_message
 Represent the 'Order Executed' message in the PITCH-2.X protocol. More...
 
struct  order_executed_price_message
 Represent the 'Order Executed at Price/Size' message in the PITCH-2.X protocol. More...
 
struct  reduce_size_long_message
 Represent the 'Reduce Size (long)' messages in the PITCH-2.X protocol. More...
 
struct  reduce_size_message
 Represent the 'Reduce Size' messages in the PITCH-2.X protocol. More...
 
struct  reduce_size_short_message
 Represent the 'Reduce Size (short)' messages in the PITCH-2.X protocol. More...
 
struct  short_add_order_message
 Represent the short version of 'Add Order' message in the PITCH-2.X protocol. More...
 
struct  time_message
 Represent the 'Time' message in the PITCH-2.X protocol. More...
 
struct  unit_clear_message
 Represent the 'Unit Clear' message in the PITCH-2.X protocol. More...
 

Functions

std::ostream & operator<< (std::ostream &os, add_order_message const &x)
 Streaming operator for jb::pitch2::add_order_message. More...
 
std::ostream & operator<< (std::ostream &os, auction_update_message const &x)
 Streaming operator for jb::pitch2::auction_update_message. More...
 
template<typename qT , typename sT , typename pT >
std::ostream & operator<< (std::ostream &os, base_add_order_message< qT, sT, pT > const &x)
 Streaming operator for jb::pitch2::add_order_message. More...
 
std::ostream & operator<< (std::ostream &os, delete_order_message const &x)
 Streaming operator for jb::pitch2::delete_message. More...
 
std::ostream & operator<< (std::ostream &os, expanded_add_order_message const &x)
 Streaming operator for jb::pitch2::expanded_add_order_message. More...
 
template<typename quantity_t , typename price_t >
std::ostream & stream_modify_message (std::ostream &os, modify_message< quantity_t, price_t > const &x)
 
std::ostream & operator<< (std::ostream &os, modify_long_message const &x)
 Streaming operator for jb::pitch2::modify_message. More...
 
std::ostream & operator<< (std::ostream &os, modify_short_message const &x)
 Streaming operator for jb::pitch2::modify_message. More...
 
std::ostream & operator<< (std::ostream &os, order_executed_message const &x)
 Streaming operator for jb::pitch2::order_executed_message. More...
 
std::ostream & operator<< (std::ostream &os, order_executed_price_message const &x)
 Streaming operator for jb::pitch2::order_executed_price_message. More...
 
template<typename quantity_t >
std::ostream & stream_reduce_size_message (std::ostream &os, reduce_size_message< quantity_t > const &x)
 
std::ostream & operator<< (std::ostream &os, reduce_size_long_message const &x)
 Streaming operator for jb::pitch2::reduce_size_message. More...
 
std::ostream & operator<< (std::ostream &os, reduce_size_short_message const &x)
 Streaming operator for jb::pitch2::reduce_size_message. More...
 
std::ostream & operator<< (std::ostream &os, short_add_order_message const &x)
 Streaming operator for jb::pitch2::short_add_order_message. More...
 
std::ostream & operator<< (std::ostream &os, time_message const &x)
 Streaming operator for jb::pitch2::time_message. More...
 
std::ostream & operator<< (std::ostream &os, unit_clear_message const &x)
 Streaming operator for jb::pitch2::unit_clear_message. More...
 

Class Documentation

◆ jb::pitch2::base_add_order_message

struct jb::pitch2::base_add_order_message

template<typename quantity_t, typename symbol_t, typename price_t>
struct jb::pitch2::base_add_order_message< quantity_t, symbol_t, price_t >

Common type for the 'Add Order' messages in the PITCH-2.X protocol.

The protocol defines 3 different 'Add Order' messages, which are largely identical except for the width of some of the fields. We use this template class to represent the common structure of these messages.

Template Parameters
quantity_tthe type used for the quantity field.
price_tthe type used for the price field.
symbol_tthe type used for the symbol field.

Definition at line 23 of file base_add_order_message.hpp.

Class Members
typedef price_t price_type Capture the price_type template parameter as a trait.
typedef quantity_t quantity_type Capture the quantity_type template parameter as a trait.
typedef symbol_t symbol_type The type for the symbol field.
Class Members
little_uint8_buf_t add_flags
little_uint8_buf_t length
little_uint8_buf_t message_type
little_uint64_buf_t order_id
price_type price
quantity_type quantity
little_uint8_buf_t side_indicator
symbol_type symbol
little_uint32_buf_t time_offset

◆ jb::pitch2::modify_message

struct jb::pitch2::modify_message

template<typename quantity_t, typename price_t>
struct jb::pitch2::modify_message< quantity_t, price_t >

Represent the 'Modify' messages in the PITCH-2.X protocol.

A full description of the fields can be found in the BATS PITCH-2.X specification: https://www.batstrading.com/resources/membership/BATS_MC_PITCH_Specification.pdf

Template Parameters
quantity_tthe type used for the quantity field.
price_tthe type used for the price field.

Definition at line 22 of file modify_message.hpp.

Class Members
typedef price_t price_type Capture the price_t template parameter as a trait.
typedef quantity_t quantity_type Capture the quantity_t template parameter as a trait.
Class Members
little_uint8_buf_t length
little_uint8_buf_t message_type
little_uint8_buf_t modify_flags
little_uint64_buf_t order_id
price_type price
quantity_type quantity
little_uint32_buf_t time_offset

◆ jb::pitch2::reduce_size_message

struct jb::pitch2::reduce_size_message

template<typename quantity_t>
struct jb::pitch2::reduce_size_message< quantity_t >

Represent the 'Reduce Size' messages in the PITCH-2.X protocol.

A full description of the fields can be found in the BATS PITCH-2.X specification: https://www.batstrading.com/resources/membership/BATS_MC_PITCH_Specification.pdf

Template Parameters
quantity_tthe type used for the canceled_quantity field.

Definition at line 21 of file reduce_size_message.hpp.

Class Members
typedef quantity_t quantity_type Capture the quantity_t template parameter as a trait.
Class Members
quantity_type canceled_quantity
little_uint8_buf_t length
little_uint8_buf_t message_type
little_uint64_buf_t order_id
little_uint32_buf_t time_offset

Function Documentation

◆ operator<<() [1/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
add_order_message const &  x 
)

Streaming operator for jb::pitch2::add_order_message.

Definition at line 7 of file add_order_message.cpp.

◆ operator<<() [2/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
expanded_add_order_message const &  x 
)

◆ operator<<() [3/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
short_add_order_message const &  x 
)

Streaming operator for jb::pitch2::short_add_order_message.

Definition at line 7 of file short_add_order_message.cpp.

◆ operator<<() [4/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
delete_order_message const &  x 
)

◆ operator<<() [5/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
unit_clear_message const &  x 
)

◆ operator<<() [6/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
auction_update_message const &  x 
)

◆ operator<<() [7/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
time_message const &  x 
)

◆ operator<<() [8/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
order_executed_message const &  x 
)

◆ operator<<() [9/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
order_executed_price_message const &  x 
)

◆ operator<<() [10/14]

template<typename qT , typename sT , typename pT >
std::ostream& jb::pitch2::operator<< ( std::ostream &  os,
base_add_order_message< qT, sT, pT > const &  x 
)

Streaming operator for jb::pitch2::add_order_message.

Definition at line 14 of file base_add_order_message_streaming.hpp.

◆ operator<<() [11/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
reduce_size_long_message const &  x 
)

Streaming operator for jb::pitch2::reduce_size_message.

Definition at line 18 of file reduce_size_message.cpp.

References stream_reduce_size_message().

◆ operator<<() [12/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
modify_long_message const &  x 
)

Streaming operator for jb::pitch2::modify_message.

Definition at line 20 of file modify_message.cpp.

References stream_modify_message().

◆ operator<<() [13/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
reduce_size_short_message const &  x 
)

Streaming operator for jb::pitch2::reduce_size_message.

Definition at line 22 of file reduce_size_message.cpp.

References stream_reduce_size_message().

◆ operator<<() [14/14]

std::ostream & jb::pitch2::operator<< ( std::ostream &  os,
modify_short_message const &  x 
)

Streaming operator for jb::pitch2::modify_message.

Definition at line 24 of file modify_message.cpp.

References stream_modify_message().

◆ stream_modify_message()

template<typename quantity_t , typename price_t >
std::ostream& jb::pitch2::stream_modify_message ( std::ostream &  os,
modify_message< quantity_t, price_t > const &  x 
)

◆ stream_reduce_size_message()

template<typename quantity_t >
std::ostream& jb::pitch2::stream_reduce_size_message ( std::ostream &  os,
reduce_size_message< quantity_t > const &  x 
)