From ce0cd1e78ea4bd5ea058e4441894b9200f70c395 Mon Sep 17 00:00:00 2001 From: Steven Ewald Date: Tue, 8 Oct 2024 11:37:48 -0500 Subject: [PATCH] checkpoint- DO NOT MERGE --- .github/workflows/exchange-ci.yml | 2 +- exchange/src/exchange/matching_cycle/base/base_cycle.cpp | 3 +++ exchange/src/exchange/traders/trader_types/generic_trader.hpp | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/exchange-ci.yml b/.github/workflows/exchange-ci.yml index 5e55a54e..821df8c3 100644 --- a/.github/workflows/exchange-ci.yml +++ b/.github/workflows/exchange-ci.yml @@ -356,7 +356,7 @@ jobs: run: cmake --install build --config Release --prefix . - name: Move config file - run: cp -r config.yml build/test/config.yml + run: cp config.yml build/test/config.yml - name: Move test algo files run: cp -r -L test/src/integration/test_algos build/test/test_algos diff --git a/exchange/src/exchange/matching_cycle/base/base_cycle.cpp b/exchange/src/exchange/matching_cycle/base/base_cycle.cpp index 78d4b3b5..1a50c64b 100644 --- a/exchange/src/exchange/matching_cycle/base/base_cycle.cpp +++ b/exchange/src/exchange/matching_cycle/base/base_cycle.cpp @@ -4,6 +4,7 @@ #include "common/messages_wrapper_to_exchange.hpp" #include "exchange/matching/engine.hpp" +#include #include namespace nutc::exchange { @@ -64,12 +65,14 @@ BaseMatchingCycle::match_orders_(std::vector orders) else { if (order.quantity <= 0.0) return; + std::cout << "base1" << std::endl; // TODO: delegate elsewhere if (order.quantity + order.trader->get_open_bids() + order.trader->get_open_asks() > max_cumulative_order_volume_) { return; } + std::cout << "base2" << std::endl; auto tmp = match_order(order, orderbook, order_fee_); std::copy(tmp.begin(), tmp.end(), std::back_inserter(matches)); } diff --git a/exchange/src/exchange/traders/trader_types/generic_trader.hpp b/exchange/src/exchange/traders/trader_types/generic_trader.hpp index c6d2e547..69b2d457 100644 --- a/exchange/src/exchange/traders/trader_types/generic_trader.hpp +++ b/exchange/src/exchange/traders/trader_types/generic_trader.hpp @@ -7,6 +7,7 @@ #include #include +#include #include namespace nutc::exchange { @@ -66,12 +67,14 @@ class GenericTrader { void modify_open_bids(common::decimal_quantity delta) { + std::cout << "bid" << std::endl; open_bids_ += delta; } void modify_open_asks(common::decimal_quantity delta) { + std::cout << "ask" << std::endl; open_asks_ += delta; }