diff --git a/src/kraken.cc b/src/kraken.cc index f57eea4..6adfd8f 100644 --- a/src/kraken.cc +++ b/src/kraken.cc @@ -5,12 +5,21 @@ #include "engine/engine.hh" #include "parse/parse.hh" -int main() { +int main(int argc, char** argv) { + auto cross_behaviour = kraken::engine::CrossBehaviour::REJECT; + + if (argc > 1) { + using namespace std::literals; + if (argv[1] == "--enable-trade"sv) { + cross_behaviour = kraken::engine::CrossBehaviour::MATCH; + } + } + auto const orders = kraken::parse::parse_orders(std::cin); auto listener = std::make_shared(); - auto engine = kraken::engine::Engine(listener); + auto engine = kraken::engine::Engine(listener, cross_behaviour); engine.process_orders(orders);