CBOE Emulator  1.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
DataFeed Namespace Reference

Logic for sending and receiving messages on a financial data feed. More...

Namespaces

 Extensions
 Extensions to the Sender / Receiver asio context.
 
 Handlers
 Logic for handling incoming messages from the Receiver.
 
 LOB
 Logic for maintaining a continuous double auction via a limit-order book.
 
 Messages
 Packet templates for the DataFeed communication protocol.
 

Classes

class  Receiver
 A multi-cast receiver for recreating a LOB::LimitOrderBook from network messages. More...
 
class  Sender
 A class for multi-casting depth of book messages from a LOB::LimitOrderBook. More...
 

Typedefs

typedef Clock::TimeStamp TimeStamp
 A forward a declaration for the Clock timestamp.
 
typedef uint32_t SequenceNumber
 A type for sequence numbers.
 
typedef uint64_t OrderID
 A type for order prices.
 
typedef uint32_t Quantity
 A type for order quantities.
 
typedef uint64_t Price
 A type for order prices.
 

Enumerations

enum  Side : char { Sell = 'S', Buy = 'B' }
 The side of an order.
 

Functions

std::ostream & operator<< (std::ostream &stream, const Side &side)
 Write the order side to a stream. More...
 
constexpr double side_to_double (Side side)
 Convert an order side character to a double. More...
 
constexpr bool side_to_bool (Side side)
 Convert an order side character to a boolean value. More...
 
constexpr LOB::Side side_to_LOB_side (Side side)
 Convert a side character to a LOB side value. More...
 
constexpr Side bool_to_side (bool side)
 Convert a boolean to an order side. More...
 

Variables

class DataFeed::Receiver __attribute__
 

Detailed Description

Logic for sending and receiving messages on a financial data feed.

Function Documentation

◆ bool_to_side()

constexpr Side DataFeed::bool_to_side ( bool  side)
inlineconstexpr

Convert a boolean to an order side.

Parameters
sidethe side to convert to an order side
Returns
Side::Sell if side is false, Side::Buy if side is true

◆ operator<<()

std::ostream& DataFeed::operator<< ( std::ostream &  stream,
const Side side 
)
inline

Write the order side to a stream.

Parameters
streamthe stream to write the order side to
sidethe order side to write to the stream
Returns
the stream after writing the order side to it

◆ side_to_bool()

constexpr bool DataFeed::side_to_bool ( Side  side)
inlineconstexpr

Convert an order side character to a boolean value.

Parameters
sidethe order side to convert
Returns
true if side is Side::Buy, false if side is Side::Sell

◆ side_to_double()

constexpr double DataFeed::side_to_double ( Side  side)
inlineconstexpr

Convert an order side character to a double.

Parameters
sidethe order side to convert to a double
Returns
1 if the side is Side::Buy, -1 if the side is Side::Sell

◆ side_to_LOB_side()

constexpr LOB::Side DataFeed::side_to_LOB_side ( Side  side)
inlineconstexpr

Convert a side character to a LOB side value.

Parameters
sidethe order side to convert
Returns
the corresponding LOB side object