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

Logic for sending/receiving application messages in a financial market. More...

Namespaces

 Extensions
 Extensions to the Client / Server asio context.
 
 Handlers
 Logic for handling CLI messages for the Client / Server.
 
 LOB
 Logic for maintaining a continuous double auction via a limit-order book.
 
 Messages
 Packet templates for the OrderEntry communication protocol.
 

Classes

class  Authorizer
 Logic for looking up and validating credentials for new connections. More...
 
class  Client
 A client for interacting with the direct market access server. More...
 
class  Connection
 A TCP connection to a client device for providing direct market access. More...
 
class  Server
 A server that manages multiple client connections for direct market access. More...
 
struct  SystemAccount
 A subclass of the LOB::Account that manages client state on the market server. More...
 

Typedefs

typedef std::set< OrderIDOrderIDSet
 a type for keeping order IDs in an unordered set
 
typedef int32_t ClientShares
 a type for storing the amount of shares a client has
 
typedef int64_t ClientCapital
 a type for storing the amount of capital a client has
 
typedef Clock::TimeStamp TimeStamp
 A forward a declaration for the Clock timestamp.
 
typedef uint32_t SequenceNumber
 A type for sequence numbers.
 
typedef std::array< char, 4 > Username
 A type for user names.
 
typedef std::array< char, 12 > Password
 A type for passwords.
 
typedef uint32_t Quantity
 A type for order quantities.
 
typedef uint64_t Price
 A type for order prices.
 
typedef uint64_t OrderID
 A type for order IDs.
 

Enumerations

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

Functions

Username make_username (std::string username)
 Make a username from the given input string. More...
 
Password make_password (std::string password)
 Make a password from the given input string. More...
 
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 OrderEntry::Server __attribute__
 

Detailed Description

Logic for sending/receiving application messages in a financial market.

A single side (buy/sell) of the LimitOrderBook.

Logic for sending/receiving application messages in a financial market.

Function Documentation

◆ bool_to_side()

constexpr Side OrderEntry::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

◆ make_password()

Password OrderEntry::make_password ( std::string  password)

Make a password from the given input string.

Parameters
passwordthe string to convert to a password object
Returns
a password (char array) with the password data

◆ make_username()

Username OrderEntry::make_username ( std::string  username)

Make a username from the given input string.

Parameters
usernamethe string to convert to a username object
Returns
a username (char array) with the username data

◆ operator<<()

std::ostream& OrderEntry::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 OrderEntry::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 OrderEntry::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 OrderEntry::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