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).
|
Stores details of a matched order, including price, quantity, and time. More...
#include <MatchedOrderDetails.hpp>
Public Member Functions | |
MatchedOrderDetail (Price price, Quantity qty) | |
Constructs a MatchedOrderDetail with specified price and quantity. More... | |
Price | getPrice () const |
Retrieves the price of the matched order. More... | |
Quantity | getQuantity () const |
Retrieves the quantity of the matched order. More... | |
std::string | getTime () const |
Retrieves the timestamp of when the order was matched as a formatted string. More... | |
Stores details of a matched order, including price, quantity, and time.
The MatchedOrderDetail class represents an individual matched order in a trading system. It contains the order's price, quantity, and timestamp, and provides accessors for retrieving each of these details.
Constructs a MatchedOrderDetail with specified price and quantity.
Initializes the matched order with the given price and quantity, and sets the timestamp to the current system time.
price | The price at which the order was matched. |
qty | The quantity of the matched order. |
|
inline |
Retrieves the price of the matched order.
|
inline |
Retrieves the quantity of the matched order.
|
inline |
Retrieves the timestamp of when the order was matched as a formatted string.
Converts the internal timestamp to a string in the format "YYYY-MM-DD HH:MM:SS".