Orderbook Simulation
OrderbookSim is a C++ application simulating a financial market order book. It efficiently manages and matches buy and sell orders while calculating the Volume-Weighted Average Price (VWAP).
OrderbookLevelInfos.hpp
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include "LevelInfo.hpp"
12 
22 private:
23  LevelInfos _bids;
24  LevelInfos _asks;
25 
26 public:
33  OrderbookLevelInfos(const LevelInfos& bids, const LevelInfos& asks)
34  : _bids{ bids }, _asks{ asks } {}
35 
41  const LevelInfos& getBids() const;
42 
48  const LevelInfos& getAsks() const;
49 };
std::vector< LevelInfo > LevelInfos
A vector of LevelInfo objects for managing multiple price levels.
Definition: LevelInfo.hpp:33
Holds the bid and ask levels for an orderbook.
Definition: OrderbookLevelInfos.hpp:21
const LevelInfos & getBids() const
Retrieves the bid levels in the orderbook.
Definition: OrderbookLevelInfos.cpp:16
const LevelInfos & getAsks() const
Retrieves the ask levels in the orderbook.
Definition: OrderbookLevelInfos.cpp:25
OrderbookLevelInfos(const LevelInfos &bids, const LevelInfos &asks)
Constructs an OrderbookLevelInfos object with specified bid and ask levels.
Definition: OrderbookLevelInfos.hpp:33