From 8e6f766ef8ea0d87d9f0d8efe79abade5da53e6d Mon Sep 17 00:00:00 2001 From: Lev Date: Sat, 12 Jun 2021 10:23:54 -0500 Subject: [PATCH] Update match bids and asks. Show sales. --- .../Topic 4/4.5.6/MerkelMain.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CM2005 Object Oriented Programming/Topic 4/4.5.6/MerkelMain.cpp b/CM2005 Object Oriented Programming/Topic 4/4.5.6/MerkelMain.cpp index 39d8205..57f5a31 100644 --- a/CM2005 Object Oriented Programming/Topic 4/4.5.6/MerkelMain.cpp +++ b/CM2005 Object Oriented Programming/Topic 4/4.5.6/MerkelMain.cpp @@ -142,6 +142,12 @@ void MerkelMain::printWallet() void MerkelMain::gotoNextTimeframe() { std::cout << "Going to next time frame. " << std::endl; + std::vector sales = orderBook.matchAsksToBids("ETH/BTC", currentTime); + std::cout << "Sales: " << sales.size() << std::endl; + for(OrderBookEntry& sale : sales) + { + std::cout << "Sale price: " << sale.amount << " Sale amount: " << sale.amount << std::endl; + } currentTime = orderBook.getNextTime(currentTime); }