BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
Command.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/Order.h"
7#include "common/Time.h"
8#include "common/Types.h"
10#include <utility>
11
12namespace trading_core {
22 class Command {
23 public:
30 Command(const CommandType type, common::ClientID clientId,
31 const common::Timestamp timestamp)
32 : mType(type), mClientId(std::move(clientId)), mTimestamp(timestamp)
33 {}
34
38 virtual ~Command() = default;
39
41 [[nodiscard]] CommandType getType() const { return mType; }
43 [[nodiscard]] common::ClientID getClientId() const { return mClientId; }
45 [[nodiscard]] common::Timestamp getTimestamp() const
46 {
47 return mTimestamp;
48 }
49
50 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
Command(const CommandType type, common::ClientID clientId, const common::Timestamp timestamp)
Constructs a new Command object.
Definition Command.h:30
CommandType getType() const
Gets the type of the command.
Definition Command.h:41
common::Timestamp mTimestamp
The timestamp of when the command was created.
Definition Command.h:55
common::ClientID getClientId() const
Gets the client's identifier.
Definition Command.h:43
common::ClientID mClientId
Definition Command.h:52
common::Timestamp getTimestamp() const
Gets the command's timestamp.
Definition Command.h:45
CommandType mType
The type of the command.
Definition Command.h:51
virtual ~Command()=default
Virtual destructor for the Command class.
std::chrono::system_clock::time_point Timestamp
A type alias for std::chrono::system_clock::time_point.
Definition Time.h:15
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