BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
ModifyOrder.h
Go to the documentation of this file.
1//
2// Created by sujal on 21-10-2025.
3//
4
5#pragma once
6#include "common/Time.h"
7#include "common/Types.h"
10
11namespace trading_core {
20 class ModifyOrder : public Command {
21 public:
30 explicit ModifyOrder(const common::ClientID& clientId,
31 const common::Timestamp timestamp,
32 const common::OrderID orderId,
33 const common::Price newPrice,
34 const common::Quantity newQuantity)
35 : Command(CommandType::ModifyOrder, clientId, timestamp),
36 mOrderId(orderId), mNewPrice(newPrice),
37 mNewQuantity(newQuantity) {};
38
40 [[nodiscard]] common::OrderID getOrderId() const { return mOrderId; }
42 [[nodiscard]] const common::Price& getNewPrice() const
43 {
44 return mNewPrice;
45 }
47 [[nodiscard]] const common::Quantity& getNewQuantity() const
48 {
49 return mNewQuantity;
50 }
51
52 private:
56 };
57} // namespace trading_core
An internal representation of a request, converted from an FIX message into this object for faster pr...
Definition Command.h:22
A command to modify an existing order in the trading engine.
Definition ModifyOrder.h:20
const common::Quantity & getNewQuantity() const
Gets the new quantity for the order.
Definition ModifyOrder.h:47
common::Quantity mNewQuantity
The new quantity for the order.
Definition ModifyOrder.h:55
ModifyOrder(const common::ClientID &clientId, const common::Timestamp timestamp, const common::OrderID orderId, const common::Price newPrice, const common::Quantity newQuantity)
Constructs a new ModifyOrder command.
Definition ModifyOrder.h:30
common::Price mNewPrice
The new price for the order.
Definition ModifyOrder.h:54
common::OrderID mOrderId
The ID of the order to be modified.
Definition ModifyOrder.h:53
common::OrderID getOrderId() const
Gets the ID of the order to be modified.
Definition ModifyOrder.h:40
const common::Price & getNewPrice() const
Gets the new price for the order.
Definition ModifyOrder.h:42
std::chrono::system_clock::time_point Timestamp
A type alias for std::chrono::system_clock::time_point.
Definition Time.h:15
double Price
A type alias for price values.
Definition Types.h:130
uint64_t OrderID
A type alias for unique order identifiers.
Definition Types.h:134
uint64_t Quantity
A type alias for quantity values.
Definition Types.h:132
std::string ClientID
A type alias for client identifiers.
Definition Types.h:140
Definition CancelOrder.h:10
CommandType
Represents the different types of commands that can be processed by the trading engine.
Definition CommandType.h:13