18 using timeChrono = std::chrono::system_clock::time_point;
51 : _type{ type }, _id{ id }, _side{ side }, _price{ price }, _quantity{ qty } {
52 _time = std::chrono::system_clock::now();
std::chrono::system_clock::time_point timeChrono
Definition: MatchedOrderDetails.hpp:20
Defines the OrderType enum and related utility functions for handling different order types.
OrderType
Specifies the different types of orders that can be used in a trading system.
Definition: OrderType.hpp:18
Defines the Side enum for representing order sides (buy or sell) and utility functions.
Side
Represents the side of an order in a trading system (either buy or sell).
Definition: Side.hpp:16
Defines type aliases commonly used in the trading system.
std::int32_t Price
Represents the price of an order or trade.
Definition: Usings.hpp:21
std::uint32_t Quantity
Represents the quantity or volume of assets in an order or trade.
Definition: Usings.hpp:29
std::uint64_t OrderId
Represents a unique identifier for an order.
Definition: Usings.hpp:37
Stores details of an individual order in the orderbook.
Definition: OrderDetail.hpp:28
OrderId getOrderId() const
Retrieves the unique identifier of the order.
Definition: OrderDetail.cpp:38
Quantity getQuantity() const
Retrieves the quantity of the order.
Definition: OrderDetail.cpp:74
Price getPrice() const
Retrieves the price of the order.
Definition: OrderDetail.cpp:65
OrderType OrderType() const
Retrieves the order type as an enum value.
Definition: OrderDetail.cpp:29
std::string getTime() const
Retrieves the timestamp of the order in a string format.
Definition: OrderDetail.cpp:83
std::string getSide() const
Retrieves the side (buy/sell) of the order as a string.
Definition: OrderDetail.cpp:47
OrderDetail(OrderType type, OrderId id, Side side, Price price, Quantity qty)
Constructs an OrderDetail with specified parameters.
Definition: OrderDetail.hpp:50
void setQuantity(Quantity newValue)
Sets a new quantity for the order.
Definition: OrderDetail.cpp:99
std::string getOrderType() const
Retrieves the order type as a string.
Definition: OrderDetail.cpp:20
OrderDetail()=default
Default constructor.
Side Side() const
Retrieves the side (buy/sell) of the order as an enum value.
Definition: OrderDetail.cpp:56