55 : _type{ type }, _id{ id }, _side{ side }, _price{ price }, _quantity{ qty }, _initialQty{ qty }, _remainingQty{ qty } {}
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
std::shared_ptr< Order > OrderPtr
A shared pointer to an Order object.
Definition: Order.hpp:163
std::list< OrderPtr > OrderPtrs
A list of shared pointers to Order objects.
Definition: Order.hpp:172
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
Represents a trading order with attributes and functionality to manage its state.
Definition: Order.hpp:31
Order(OrderType type, OrderId id, Side side, Price price, Quantity qty)
Constructs an order with specified type, ID, side, price, and quantity.
Definition: Order.hpp:54
OrderType getOrderType() const
Retrieves the type of the order (e.g., Market, GoodTillCancel).
Definition: Order.cpp:21
Side getSide() const
Retrieves the side of the order (Buy or Sell).
Definition: Order.cpp:27
Quantity getQty() const
Retrieves the current quantity of the order.
Definition: Order.cpp:51
Quantity getFilledQty() const
Retrieves the filled quantity of the order.
Definition: Order.cpp:69
Quantity getRemainingQty() const
Retrieves the remaining quantity of the order.
Definition: Order.cpp:60
OrderId getOrderId() const
Retrieves the unique ID of the order.
Definition: Order.cpp:15
void Fill(Quantity qty)
Fills the order by a specified quantity.
Definition: Order.cpp:86
bool isFilled() const
Checks if the order is fully filled.
Definition: Order.cpp:75
Order(OrderId orderId, Side side, Quantity quantity)
Constructs a market order with specified ID, side, and quantity.
Definition: Order.hpp:67
Quantity getInitialQty() const
Retrieves the initial quantity of the order.
Definition: Order.cpp:42
void toGoodTillCancel(Price price)
Converts a market order to a Good Till Cancel order with a specified price.
Definition: Order.cpp:102
Price getPrice() const
Retrieves the price of the order.
Definition: Order.cpp:33
Holds application-wide constants for common values.
Definition: Constants.hpp:21