ATS
An algorithmic trading system completely written in C++
Public Member Functions | Public Attributes | List of all members
ats::Order Struct Reference

The Order struct represents an order to be placed on an exchange. More...

#include <OrderManager.h>

Public Member Functions

 Order (long id=-1)
 
 Order (long id, OrderType type, Side side, std::string symbol, double quantity, double price, double stopPrice=0., double icebergQty=0., long recvWindow=0, long emsId=0, std::string timeInForce="", time_t time=0)
 The Order constructor. More...
 

Public Attributes

long id
 
std::string symbol
 
double quantity
 
double price
 
OrderType type
 
Side side
 
double stopPrice
 
double icebergQty
 
long recvWindow
 
long emsId
 
std::string timeInForce
 
time_t time
 

Detailed Description

The Order struct represents an order to be placed on an exchange.

Constructor & Destructor Documentation

◆ Order()

ats::Order::Order ( long  id,
OrderType  type,
Side  side,
std::string  symbol,
double  quantity,
double  price,
double  stopPrice = 0.,
double  icebergQty = 0.,
long  recvWindow = 0,
long  emsId = 0,
std::string  timeInForce = "",
time_t  time = 0 
)
inline

The Order constructor.

Parameters
idThe order ID.
symbolThe trading symbol of the order.
quantityThe quantity of the asset to be traded in the order.
priceThe price per unit of the asset in the order.
typeThe type of the order (LIMIT, MARKET, STOP_LOSS, etc.).
sideThe side of the order (BUY or SELL).
stopPriceThe stop price of the order (if applicable).
icebergQtyThe iceberg quantity of the order (if applicable).
recvWindowThe receive window of the order (if applicable).
emsIdThe ID assigned by the EMS to the order (if applicable).
timeInForceThe time in force of the order (if applicable).
timeThe time when the order was sent

Member Data Documentation

◆ emsId

long ats::Order::emsId

The EMS ID of the order.

◆ icebergQty

double ats::Order::icebergQty

The iceberg quantity of the order (only for LIMIT_MAKER orders).

◆ id

long ats::Order::id

The ID of the order.

◆ price

double ats::Order::price

The price of the asset in the quote currency.

◆ quantity

double ats::Order::quantity

The quantity of the asset to buy/sell.

◆ recvWindow

long ats::Order::recvWindow

The receive window of the order (in milliseconds).

◆ side

Side ats::Order::side

The side of the order (e.g. BUY or SELL).

◆ stopPrice

double ats::Order::stopPrice

The stop price of the order (only for STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders).

◆ symbol

std::string ats::Order::symbol

The trading symbol of the order.

◆ time

time_t ats::Order::time

The time when the order was sent.

◆ timeInForce

std::string ats::Order::timeInForce

The time in force of the order (e.g. GTC, IOC, FOK, etc.).

◆ type

OrderType ats::Order::type

The type of the order (e.g. LIMIT, MARKET, etc.).


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