libjmmcg
build_2176
A C++ library containing an eclectic mix of useful, advanced components.
|
A simple, MIT-protocol exchange simulator. More...
#include <processing_rules.hpp>
Public Types | |
using | base_t = message_responses< MsgDetails, MsgDetails, Derived, typename MsgDetails::client_to_exchange_messages_t, SktT > |
using | msg_details_t = typename base_t::src_msg_details_t |
using | socket_t = typename base_t::socket_t |
using | derived_t = typename base_t::derived_t |
Public Member Functions | |
template<class Buff > | |
bool | process_msg (Buff const &buff, socket_t &exchg_skt, socket_t &client_skt) FORCE_INLINE |
Static Public Member Functions | |
static std::string | to_string () noexcept(false) |
Static Public Attributes | |
static constexpr msg_details_t::UserName_t | username {"usr"} |
The only valid username. More... | |
static constexpr msg_details_t::Password_t | password {"fubar"} |
The only valid password. More... | |
static constexpr msg_details_t::Password_t | new_password {"snafu"} |
The only valid new password. More... | |
static constexpr std::int32_t | quantity_limit =100 |
The magic quantity value. More... | |
static constexpr msg_details_t::Price_t | price =42 |
For limit orders, this is the price at which the order will be traded, otherwise it will be left "on the market". More... | |
static constexpr msg_details_t::Price_t | scaled_price =42*msg_details_t::implied_decimal_places |
For limit orders, this is the native, scaled price at which the order will be traded, otherwise it will be left "on the market", which is used within the simulator. More... | |
Protected Types | |
using | order_book_t = std::map< typename msg_details_t::ClientOrderID_t, typename msg_details_t::NewOrder > |
Protected Attributes | |
order_book_t | order_book |
int32_t | sequenceNumber =0 |
Additional Inherited Members |
A simple, MIT-protocol exchange simulator.
This server is single-threaded, and permits only one client connection at a time. The behaviour of this simulator is a simplification derived from the specification in [1]. [1] "MIT203 - MILLENNIUM EXCHANGE Native Trading Gateway"
Definition at line 62 of file processing_rules.hpp.
using jmmcg::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::base_t = message_responses<MsgDetails, MsgDetails, Derived, typename MsgDetails::client_to_exchange_messages_t, SktT> |
Definition at line 64 of file processing_rules.hpp.
using jmmcg::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::derived_t = typename base_t::derived_t |
Definition at line 67 of file processing_rules.hpp.
using jmmcg::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::msg_details_t = typename base_t::src_msg_details_t |
Definition at line 65 of file processing_rules.hpp.
|
protected |
Definition at line 94 of file processing_rules.hpp.
using jmmcg::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::socket_t = typename base_t::socket_t |
Definition at line 66 of file processing_rules.hpp.
|
inline |
Definition at line 73 of file processing_rules_impl.hpp.
|
inlinestaticnoexcept |
Definition at line 79 of file processing_rules_impl.hpp.
|
static |
The only valid new password.
Definition at line 74 of file processing_rules.hpp.
|
protected |
Definition at line 95 of file processing_rules.hpp.
|
static |
The only valid password.
Definition at line 72 of file processing_rules.hpp.
|
static |
For limit orders, this is the price at which the order will be traded, otherwise it will be left "on the market".
Definition at line 81 of file processing_rules.hpp.
|
static |
The magic quantity value.
A value less than this will result in a full-filled ExecutionReport, otherwise a partial fill ExecutionReport will be returned, and the remaining quantity left "on the market".
Definition at line 79 of file processing_rules.hpp.
|
static |
For limit orders, this is the native, scaled price at which the order will be traded, otherwise it will be left "on the market", which is used within the simulator.
Definition at line 83 of file processing_rules.hpp.
|
protected |
Definition at line 96 of file processing_rules.hpp.
|
static |
The only valid username.
Definition at line 70 of file processing_rules.hpp.