libjmmcg
build_2783
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 | src_msg_details_t = msg_details_t |
using | socket_t = typename base_t::socket_t |
using | derived_t = typename base_t::derived_t |
using | Price_t = typename std::conditional< std::is_integral< typename msg_details_t::Price_t >::value, typename msg_details_t::Price_t, std::uint64_t >::type |
Public Member Functions | |
virtual bool | process_msg (typename src_msg_details_t::msg_buffer_t const &buff, socket_t &exchg_skt, socket_t &client_skt) override=0 |
std::string | to_string () const 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 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 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 Member Functions | |
simulator_responses ()=default | |
simulator_responses (simulator_responses const &)=default | |
Protected Attributes | |
order_book_t | order_book |
std::int32_t | sequenceNumber {} |
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 240 of file processing_rules.hpp.
using isimud::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 242 of file processing_rules.hpp.
using isimud::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::derived_t = typename base_t::derived_t |
Definition at line 246 of file processing_rules.hpp.
using isimud::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::msg_details_t = typename base_t::src_msg_details_t |
Definition at line 243 of file processing_rules.hpp.
|
protected |
Definition at line 276 of file processing_rules.hpp.
using isimud::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::Price_t = typename std::conditional<std::is_integral<typename msg_details_t::Price_t>::value, typename msg_details_t::Price_t, std::uint64_t>::type |
Definition at line 250 of file processing_rules.hpp.
using isimud::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::socket_t = typename base_t::socket_t |
Definition at line 245 of file processing_rules.hpp.
using isimud::exchanges::common::simulator_responses< MsgDetails, Derived, SktT >::src_msg_details_t = msg_details_t |
Definition at line 244 of file processing_rules.hpp.
|
protecteddefault |
|
protecteddefault |
|
overridepure virtual |
|
inlinenoexcept |
Definition at line 74 of file processing_rules_impl.hpp.
|
inlinestaticconstexpr |
The only valid new password.
Definition at line 257 of file processing_rules.hpp.
|
protected |
Definition at line 277 of file processing_rules.hpp.
|
inlinestaticconstexpr |
The only valid password.
Definition at line 255 of file processing_rules.hpp.
|
inlinestaticconstexpr |
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 264 of file processing_rules.hpp.
|
inlinestaticconstexpr |
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 262 of file processing_rules.hpp.
|
inlinestaticconstexpr |
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 266 of file processing_rules.hpp.
|
protected |
Definition at line 278 of file processing_rules.hpp.
|
inlinestaticconstexpr |
The only valid username.
Definition at line 253 of file processing_rules.hpp.