![]() |
Trading System API
3.0
Library for Simulating and Deploying Trading and Investment Strategies
|
Represents a transaction that occurred on an exchange or as part of a simulation when an order is filled or partially filled. More...
#include <TSATransaction.h>
Public Member Functions | |
transaction (void) | |
Constructor. | |
virtual | ~transaction (void) |
Destructor. | |
void | clear (void) |
Returns the object to an 'undefined' state where defined() returns false. | |
bool | defined (void) const |
Returns true if the object has been initialized. More... | |
bool | fills (const order_ref &order_ref) const |
Returns true if the transaction fills, in its entirety, a given order. Note: This member function returns false, but does not throw an exception, if the order object is not defined (see order::defined())! More... | |
identifier_t | id (void) const |
Returns the transaction ID. More... | |
identifier_t | instrument_id (void) const |
Returns the ID of the instrument that originated the transaction. More... | |
instrument * | instrument_ptr (void) const |
Returns a pointer to the instrument that originated the transaction. More... | |
bool | is_equal (const transaction &other) const |
Returns true if self is identical to other. More... | |
order::action | order_action (void) const |
Returns the originating order's action type (buy or sell). More... | |
order::exec_interval | order_execution_interval (void) const |
Returns the originating order's 'execution interval'. More... | |
identifier_t | order_id (void) const |
Returns the originating order's ID. More... | |
const std::string & | order_tag (void) const |
Returns the originating order's 'tag' which is a user defined string intended to describe an order. More... | |
order::type | order_type (void) const |
Returns the originating order's type. More... | |
bool | partially_fills (const order_ref &order) const |
Returns true if the transaction partially fills order. Note: This member function returns false if the order object is not defined but does not throw an exception. More... | |
double | price (void) const |
Returns the price at which the transaction occurred. More... | |
void | print (std::ostream &stream) const |
Prints transaction properties to the given stream. More... | |
quantity_t | quantity (void) const |
Returns the quantity of securities that changed ownership during the transaction. More... | |
bool | relates (const order_ref &order_ref) const |
Returns true if the transaction fills, either partially or in its entirety, a given order. Note: This member function returns false, but does not throw an exception, if the order object is not defined (see order::defined())! More... | |
quantity_t | size (void) const |
Returns the quantity of securities that changed ownership during the transaction. Returns the same value as quantity(). More... | |
const date_time & | timestamp () const |
Returns the transaction timestamp. More... | |
![]() | |
object (void) | |
Constructor. | |
virtual | ~object (void) |
Destructor. | |
const char * | class_name (void) const |
Returns the class name as returned by the 'Real Time Type Information' (RTTI) mechanism. More... | |
bool | has_same_class_as (const object &other) const |
Returns true if self has the same type as other object. More... | |
Represents a transaction that occurred on an exchange or as part of a simulation when an order is filled or partially filled.
bool tsa::transaction::defined | ( | void | ) | const |
Returns true if the object has been initialized.
bool tsa::transaction::fills | ( | const order_ref & | order_ref | ) | const |
identifier_t tsa::transaction::id | ( | void | ) | const |
Returns the transaction ID.
identifier_t tsa::transaction::instrument_id | ( | void | ) | const |
Returns the ID of the instrument that originated the transaction.
instrument * tsa::transaction::instrument_ptr | ( | void | ) | const |
Returns a pointer to the instrument that originated the transaction.
bool tsa::transaction::is_equal | ( | const transaction & | other | ) | const |
Returns true if self is identical to other.
other | The other transaction. |
order::action tsa::transaction::order_action | ( | void | ) | const |
Returns the originating order's action type (buy or sell).
order::exec_interval tsa::transaction::order_execution_interval | ( | void | ) | const |
Returns the originating order's 'execution interval'.
identifier_t tsa::transaction::order_id | ( | void | ) | const |
Returns the originating order's ID.
const std::string & tsa::transaction::order_tag | ( | void | ) | const |
Returns the originating order's 'tag' which is a user defined string intended to describe an order.
order::type tsa::transaction::order_type | ( | void | ) | const |
Returns the originating order's type.
bool tsa::transaction::partially_fills | ( | const order_ref & | order | ) | const |
double tsa::transaction::price | ( | void | ) | const |
Returns the price at which the transaction occurred.
void tsa::transaction::print | ( | std::ostream & | stream | ) | const |
Prints transaction properties to the given stream.
[in,out] | stream | The stream. |
quantity_t tsa::transaction::quantity | ( | void | ) | const |
Returns the quantity of securities that changed ownership during the transaction.
bool tsa::transaction::relates | ( | const order_ref & | order_ref | ) | const |
quantity_t tsa::transaction::size | ( | void | ) | const |
Returns the quantity of securities that changed ownership during the transaction. Returns the same value as quantity().