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).
|
Represents a modification to an existing order. More...
#include <OrderModify.hpp>
Public Member Functions | |
OrderModify (OrderId orderId, Side side, Price price, Quantity quantity) | |
Constructs an OrderModify object with the specified parameters. More... | |
OrderId | getOrderId () const |
Gets the order ID of the modified order. More... | |
Price | getPrice () const |
Gets the price of the modified order. More... | |
Side | getSide () const |
Gets the side (buy or sell) of the modified order. More... | |
Quantity | getQuantity () const |
Gets the quantity of the modified order. More... | |
OrderPtr | toOrderPtr (OrderType type) const |
Converts the order modification into a shared pointer to a new Order object. More... | |
Represents a modification to an existing order.
The OrderModify class is used to store and apply modifications to an order. It includes details such as the modified order's ID, price, side (buy/sell), and quantity. The class also provides a method to convert these modifications into a new Order object.
Constructs an OrderModify object with the specified parameters.
orderId | The unique identifier of the order to modify. |
side | The side (buy or sell) of the order. |
price | The updated price of the order. |
quantity | The updated quantity of the order. |
|
inline |
Gets the order ID of the modified order.
|
inline |
Gets the price of the modified order.
|
inline |
Gets the quantity of the modified order.
|
inline |
Gets the side (buy or sell) of the modified order.
Converts the order modification into a shared pointer to a new Order object.
Creates a new OrderPtr from the modification details using the specified order type.
type | The type of the new order to create (e.g., market, limit). |