BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
common::Order Class Reference

Represents a single trading order in the system. More...

#include <Order.h>

Collaboration diagram for common::Order:
Collaboration graph

Public Member Functions

 Order (const OrderID clientOrderId, const OrderID coreOrderId, const Symbol symbol, ClientID client, std::string senderCompID, const OrderSide side, const OrderType type, const TimeInForce timeInForce, const Quantity quantity, const Price price, const Timestamp ts)
 Constructs a new Order object.
 
const ClientIDgetClientId () const
 Gets the client's identifier (session ID).
 
const OrderIDgetClientOrderId () const
 Gets the order's client-provided identifier.
 
const OrderIDgetId () const
 Gets the order's core-provided identifier. This is the primary ID for internal tracking.
 
OrderType getOrderType () const
 Gets the order type (Limit/Market).
 
Quantity getOriginalQuantity () const
 Gets the original quantity of the order.
 
Price getPrice () const
 Gets the order price.
 
Quantity getRemainingQuantity () const
 Gets the remaining quantity of the order.
 
const std::string & getSenderCompID () const
 Gets the SenderCompID, identifying the actual trader.
 
OrderSide getSide () const
 Gets the order side (Buy/Sell).
 
OrderStatus getStatus () const
 Gets the current status of the order.
 
const SymbolgetSymbol () const
 Gets the financial instrument symbol.
 
TimeInForce getTimeInForce () const
 Gets the time in force of the order.
 
Timestamp getTimestamp () const
 Gets the order creation timestamp.
 
void setClientOrderId (const OrderID id)
 Sets the order's client-provided identifier.
 
void setCoreOrderId (const OrderID id)
 Sets the order's core-provided identifier.
 
void setOriginalQuantity (const Quantity qty)
 Sets the original and remaining quantity of the order.
 
void setPrice (const Price price)
 Sets the price of the order.
 
void setRemainingQuantity (const Quantity qty)
 Sets the remaining quantity of the order.
 
void setStatus (const OrderStatus status)
 Sets the status of the order.
 
void setTimestamp (const Timestamp ts)
 Sets the timestamp of the order.
 

Private Attributes

ClientID mClientId
 Identifier of the client placing the order (session ID).
 
OrderID mClientOrderId
 Unique identifier for the order given by client.
 
OrderID mCoreOrderId
 Unique identifier for the order given by core.
 
OrderSide mOrderSide
 The side of the order (Buy or Sell).
 
OrderStatus mOrderStatus
 The current status of the order.
 
OrderType mOrderType
 The type of the order (Limit or Market).
 
Quantity mOriginalQuantity
 The original quantity of the order.
 
Price mPrice
 The price of the order.
 
Quantity mRemainingQuantity
 The quantity of the order that has not yet been filled.
 
std::string mSenderCompID
 SenderCompID from the FIX message, identifying the actual trader.
 
Symbol mSymbol
 Financial instrument symbol.
 
TimeInForce mTimeInForce
 The time in force of the order.
 
Timestamp mTimestamp
 The timestamp of when the order was created.
 

Detailed Description

Represents a single trading order in the system.

This class is a data model that encapsulates all the properties of an order, such as its ID, symbol, client, side, type, quantity, price, and status.

Constructor & Destructor Documentation

◆ Order()

common::Order::Order ( const OrderID  clientOrderId,
const OrderID  coreOrderId,
const Symbol  symbol,
ClientID  client,
std::string  senderCompID,
const OrderSide  side,
const OrderType  type,
const TimeInForce  timeInForce,
const Quantity  quantity,
const Price  price,
const Timestamp  ts 
)
inline

Constructs a new Order object.

Parameters
clientOrderIdThe unique identifier for the order given by the client.
coreOrderIdThe unique identifier for the order assigned by the core.
symbolThe financial instrument symbol.
clientThe identifier of the client placing the order.
senderCompIDThe SenderCompID from the FIX message, identifying the actual trader.
sideThe side of the order (Buy or Sell).
typeThe type of the order (Limit or Market).
timeInForceThe time in force of the order.
quantityThe original quantity of the order.
priceThe price of the order.
tsThe timestamp of when the order was created.

Member Function Documentation

◆ getClientId()

const ClientID & common::Order::getClientId ( ) const
inline

Gets the client's identifier (session ID).

Here is the caller graph for this function:

◆ getClientOrderId()

const OrderID & common::Order::getClientOrderId ( ) const
inline

Gets the order's client-provided identifier.

Here is the caller graph for this function:

◆ getId()

const OrderID & common::Order::getId ( ) const
inline

Gets the order's core-provided identifier. This is the primary ID for internal tracking.

Here is the caller graph for this function:

◆ getOrderType()

OrderType common::Order::getOrderType ( ) const
inline

Gets the order type (Limit/Market).

Here is the caller graph for this function:

◆ getOriginalQuantity()

Quantity common::Order::getOriginalQuantity ( ) const
inline

Gets the original quantity of the order.

Here is the caller graph for this function:

◆ getPrice()

Price common::Order::getPrice ( ) const
inline

Gets the order price.

Here is the caller graph for this function:

◆ getRemainingQuantity()

Quantity common::Order::getRemainingQuantity ( ) const
inline

Gets the remaining quantity of the order.

Here is the caller graph for this function:

◆ getSenderCompID()

const std::string & common::Order::getSenderCompID ( ) const
inline

Gets the SenderCompID, identifying the actual trader.

Here is the caller graph for this function:

◆ getSide()

OrderSide common::Order::getSide ( ) const
inline

Gets the order side (Buy/Sell).

Here is the caller graph for this function:

◆ getStatus()

OrderStatus common::Order::getStatus ( ) const
inline

Gets the current status of the order.

Here is the caller graph for this function:

◆ getSymbol()

const Symbol & common::Order::getSymbol ( ) const
inline

Gets the financial instrument symbol.

Here is the caller graph for this function:

◆ getTimeInForce()

TimeInForce common::Order::getTimeInForce ( ) const
inline

Gets the time in force of the order.

Here is the caller graph for this function:

◆ getTimestamp()

Timestamp common::Order::getTimestamp ( ) const
inline

Gets the order creation timestamp.

Here is the caller graph for this function:

◆ setClientOrderId()

void common::Order::setClientOrderId ( const OrderID  id)
inline

Sets the order's client-provided identifier.

◆ setCoreOrderId()

void common::Order::setCoreOrderId ( const OrderID  id)
inline

Sets the order's core-provided identifier.

◆ setOriginalQuantity()

void common::Order::setOriginalQuantity ( const Quantity  qty)
inline

Sets the original and remaining quantity of the order.

◆ setPrice()

void common::Order::setPrice ( const Price  price)
inline

Sets the price of the order.

◆ setRemainingQuantity()

void common::Order::setRemainingQuantity ( const Quantity  qty)
inline

Sets the remaining quantity of the order.

Here is the caller graph for this function:

◆ setStatus()

void common::Order::setStatus ( const OrderStatus  status)
inline

Sets the status of the order.

Here is the caller graph for this function:

◆ setTimestamp()

void common::Order::setTimestamp ( const Timestamp  ts)
inline

Sets the timestamp of the order.

Member Data Documentation

◆ mClientId

ClientID common::Order::mClientId
private

Identifier of the client placing the order (session ID).

◆ mClientOrderId

OrderID common::Order::mClientOrderId
private

Unique identifier for the order given by client.

◆ mCoreOrderId

OrderID common::Order::mCoreOrderId
private

Unique identifier for the order given by core.

◆ mOrderSide

OrderSide common::Order::mOrderSide
private

The side of the order (Buy or Sell).

◆ mOrderStatus

OrderStatus common::Order::mOrderStatus
private

The current status of the order.

◆ mOrderType

OrderType common::Order::mOrderType
private

The type of the order (Limit or Market).

◆ mOriginalQuantity

Quantity common::Order::mOriginalQuantity
private

The original quantity of the order.

◆ mPrice

Price common::Order::mPrice
private

The price of the order.

◆ mRemainingQuantity

Quantity common::Order::mRemainingQuantity
private

The quantity of the order that has not yet been filled.

◆ mSenderCompID

std::string common::Order::mSenderCompID
private

SenderCompID from the FIX message, identifying the actual trader.

◆ mSymbol

Symbol common::Order::mSymbol
private

Financial instrument symbol.

◆ mTimeInForce

TimeInForce common::Order::mTimeInForce
private

The time in force of the order.

◆ mTimestamp

Timestamp common::Order::mTimestamp
private

The timestamp of when the order was created.


The documentation for this class was generated from the following file: