BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
ExecutionReport.h
Go to the documentation of this file.
1#pragma once
2#include "Types.h"
3#include "common/Time.h"
4#include "common/Types.h"
5
6namespace fix {
15 public:
35 ExecutionReport(const CompID& senderCompId, const CompID& targetCompId,
36 const SequenceNumber msgSeqNum,
37 const ExchangeOrderID& exchangeOrderId,
38 const ClientOrderID& clientOrderId,
39 const std::string& executionId,
40 const common::OrderStatus status, const std::string& text,
41 const Symbol& symbol, const common::OrderSide side,
42 const Quantity orderQty, const Quantity cumQty,
43 const Quantity leavesQty, const Price lastPrice,
44 const Quantity lastQty,
45 const common::Timestamp& transactTime)
46 : mSenderCompId(senderCompId), mTargetCompId(targetCompId),
47 mMessageSequenceNumber(msgSeqNum),
48 mExchangeOrderId(exchangeOrderId), mClientOrderId(clientOrderId),
49 mExecutionId(executionId), mStatus(status), mText(text),
50 mSymbol(symbol), mSide(side), mOrderQuantity(orderQty),
51 mCumulativeQuantity(cumQty), mLeavesQuantity(leavesQty),
52 mLastPrice(lastPrice), mLastQuantity(lastQty),
53 mTransactionTime(transactTime)
54 {}
55
57 [[nodiscard]] const CompID& getSenderCompId() const
58 {
59 return mSenderCompId;
60 }
62 [[nodiscard]] const CompID& getTargetCompId() const
63 {
64 return mTargetCompId;
65 }
68 {
70 }
72 [[nodiscard]] const ExchangeOrderID& getExchangeOrderId() const
73 {
74 return mExchangeOrderId;
75 }
77 [[nodiscard]] const ClientOrderID& getClientOrderId() const
78 {
79 return mClientOrderId;
80 }
82 [[nodiscard]] const std::string& getExecutionId() const
83 {
84 return mExecutionId;
85 }
87 [[nodiscard]] common::OrderStatus getStatus() const { return mStatus; }
89 [[nodiscard]] const std::string& getText() const { return mText; }
91 [[nodiscard]] const Symbol& getSymbol() const { return mSymbol; }
93 [[nodiscard]] common::OrderSide getSide() const { return mSide; }
95 [[nodiscard]] Quantity getOrderQuantity() const
96 {
97 return mOrderQuantity;
98 }
100 [[nodiscard]] Quantity getCumulativeQuantity() const
101 {
102 return mCumulativeQuantity;
103 }
105 [[nodiscard]] Quantity getLeavesQuantity() const
106 {
107 return mLeavesQuantity;
108 }
110 [[nodiscard]] Price getLastPrice() const { return mLastPrice; }
112 [[nodiscard]] Quantity getLastQuantity() const { return mLastQuantity; }
114 [[nodiscard]] const common::Timestamp& getTransactionTime() const
115 {
116 return mTransactionTime;
117 }
118
119 private:
126
132 std::string mExecutionId;
133
137 std::string mText;
138
155 };
156} // namespace fix
Represents a FIX Execution Report (35=8) message.
Definition ExecutionReport.h:14
SequenceNumber getMessageSequenceNumber() const
Gets the message sequence number (Tag 34).
Definition ExecutionReport.h:67
Quantity getLeavesQuantity() const
Gets the remaining quantity (Tag 151).
Definition ExecutionReport.h:105
ExchangeOrderID mExchangeOrderId
Tag 37: Exchange-assigned order ID.
Definition ExecutionReport.h:128
const std::string & getText() const
Gets the text message (Tag 58).
Definition ExecutionReport.h:89
CompID mTargetCompId
Tag 56: Target's component ID.
Definition ExecutionReport.h:123
common::Timestamp mTransactionTime
Tag 60: Time of the transaction.
Definition ExecutionReport.h:154
ClientOrderID mClientOrderId
Tag 11: Client-assigned order ID (echoed back).
Definition ExecutionReport.h:130
Price getLastPrice() const
Gets the price of the last fill (Tag 31).
Definition ExecutionReport.h:110
ExecutionReport(const CompID &senderCompId, const CompID &targetCompId, const SequenceNumber msgSeqNum, const ExchangeOrderID &exchangeOrderId, const ClientOrderID &clientOrderId, const std::string &executionId, const common::OrderStatus status, const std::string &text, const Symbol &symbol, const common::OrderSide side, const Quantity orderQty, const Quantity cumQty, const Quantity leavesQty, const Price lastPrice, const Quantity lastQty, const common::Timestamp &transactTime)
Constructs a new ExecutionReport object.
Definition ExecutionReport.h:35
Quantity mLastQuantity
Tag 32: Quantity of the last fill.
Definition ExecutionReport.h:152
Symbol mSymbol
Tag 55: Financial instrument symbol.
Definition ExecutionReport.h:140
Quantity mCumulativeQuantity
Tag 14: Cumulative filled quantity.
Definition ExecutionReport.h:146
const ExchangeOrderID & getExchangeOrderId() const
Gets the exchange-assigned order ID (Tag 37).
Definition ExecutionReport.h:72
common::OrderSide mSide
Tag 54: Side of the order (Buy/Sell).
Definition ExecutionReport.h:142
const CompID & getTargetCompId() const
Gets the target's component ID (Tag 56).
Definition ExecutionReport.h:62
const std::string & getExecutionId() const
Gets the execution ID (Tag 17).
Definition ExecutionReport.h:82
CompID mSenderCompId
Tag 49: Sender's component ID.
Definition ExecutionReport.h:121
common::OrderSide getSide() const
Gets the side of the order (Buy/Sell) (Tag 54).
Definition ExecutionReport.h:93
Price mLastPrice
Tag 31: Price of the last fill.
Definition ExecutionReport.h:150
const CompID & getSenderCompId() const
Gets the sender's component ID (Tag 49).
Definition ExecutionReport.h:57
std::string mText
Tag 58: Text message (e.g., reject reason, notes).
Definition ExecutionReport.h:137
Quantity getCumulativeQuantity() const
Gets the cumulative filled quantity (Tag 14).
Definition ExecutionReport.h:100
Quantity getLastQuantity() const
Gets the quantity of the last fill (Tag 32).
Definition ExecutionReport.h:112
common::OrderStatus mStatus
Tag 39: Order status.
Definition ExecutionReport.h:135
common::OrderStatus getStatus() const
Gets the order status (Tag 39).
Definition ExecutionReport.h:87
const ClientOrderID & getClientOrderId() const
Gets the client-assigned order ID (Tag 11).
Definition ExecutionReport.h:77
const Symbol & getSymbol() const
Gets the financial instrument symbol (Tag 55).
Definition ExecutionReport.h:91
Quantity getOrderQuantity() const
Gets the total order quantity (Tag 38).
Definition ExecutionReport.h:95
const common::Timestamp & getTransactionTime() const
Gets the time of the transaction (Tag 60).
Definition ExecutionReport.h:114
SequenceNumber mMessageSequenceNumber
Tag 34: Message sequence number.
Definition ExecutionReport.h:125
Quantity mLeavesQuantity
Tag 151: Remaining quantity.
Definition ExecutionReport.h:148
Quantity mOrderQuantity
Tag 38: Total order quantity.
Definition ExecutionReport.h:144
std::string mExecutionId
Tag 17: Execution ID.
Definition ExecutionReport.h:132
Defines type aliases for FIX protocol fields.
std::chrono::system_clock::time_point Timestamp
A type alias for std::chrono::system_clock::time_point.
Definition Time.h:15
Instrument
Represents the financial instruments available for trading.
Definition Instrument.h:17
OrderStatus
Represents the lifecycle of an order.
Definition Types.h:41
OrderSide
Represents the side of an order (Buy or Sell).
Definition Types.h:17
Definition ExecutionReport.h:6
uint32_t CompID
Type alias for a component ID (e.g., SenderCompID, TargetCompID).
Definition Types.h:16
uint64_t SequenceNumber
Type alias for a message sequence number.
Definition Types.h:18
uint64_t ClientOrderID
Type alias for a client-assigned order ID.
Definition Types.h:20
common::Quantity Quantity
Type alias for a quantity field, inheriting from the common Quantity type.
Definition Types.h:28
uint64_t ExchangeOrderID
Type alias for an exchange-assigned order ID.
Definition Types.h:22
common::Price Price
Type alias for a price field, inheriting from the common Price type.
Definition Types.h:25