5#include <nlohmann/json.hpp>
38 slick::queue<OrderResponse> &response_queue);
std::unique_ptr< MatchingEngine > createMatchingEngine(const MatchingConfig &config, slick::queue< OrderResponse > &response_queue)
constexpr int32_t DOUBLE_MULTIPLIER
Which engine a venue's symbols match with.
static MatchingConfig from_json(const nlohmann::json &config)
Reads matching_algorithm ("fifo" by default, or "pro_rata") and, for pro-rata, the pro_rata block: lo...
MatchingEngine::Type type
Pro-rata allocation rules. Quantities use the venue's fixed-point scale.
bool operator==(const ProRataConfig &) const =default
qty_t min_allocation
a pro-rata share below this rounds to zero
void validate() const
Throws std::invalid_argument unless lot_size > 0, min_allocation >= 0 and fifo_percent <= 100.
uint8_t fifo_percent
share of the incoming quantity filled FIFO before pro-rata
qty_t lot_size
allocations round down to whole lots