CBOE Emulator  1.0
Public Member Functions | Public Attributes | List of all members
OrderEntry::LOB::Account Struct Reference

A trading account for a LimitOrderBook client. More...

#include <structures.hpp>

Inheritance diagram for OrderEntry::LOB::Account:
OrderEntry::SystemAccount< Handler > OrderEntry::SystemAccount< OrderEntry::Connection >

Public Member Functions

 Account (Shares shares_=0, Capital capital_=0)
 Create an account with given values. More...
 
void limit (Order *order)
 Place a limit order. More...
 
void cancel (Order *order)
 Cancel a limit order. More...
 
void fill (Side side, Quantity quantity, Price price)
 Fill a market order on given side with quantity and price. More...
 
virtual void limit_fill (Order *limit, Order *market)
 Fill a limit order. More...
 
virtual void limit_partial (Order *limit, Order *market)
 Partially fill a limit order. More...
 
virtual void market_fill (Order *limit, Order *market)
 Fill a market order. More...
 
virtual void market_partial (Order *limit, Order *market)
 Partially fill a market order. More...
 

Public Attributes

Shares shares = 0
 the number of shares owned by the account
 
Capital capital = 0
 the total capital the account has (funds)
 
std::set< Order * > orders = {}
 the set of active orders for the account
 

Detailed Description

A trading account for a LimitOrderBook client.

Constructor & Destructor Documentation

◆ Account()

OrderEntry::LOB::Account::Account ( Shares  shares_ = 0,
Capital  capital_ = 0 
)
inline

Create an account with given values.

Parameters
shares_the number of shares owned by the account
capital_the total capital the account has (funds)

Member Function Documentation

◆ cancel()

void OrderEntry::LOB::Account::cancel ( Order order)
inline

Cancel a limit order.

Parameters
orderthe order to cancel

◆ fill()

void OrderEntry::LOB::Account::fill ( Side  side,
Quantity  quantity,
Price  price 
)
inline

Fill a market order on given side with quantity and price.

Parameters
sidethe side of the trade
quantitythe quantity of the trade
pricethe price the trade occurred at

◆ limit()

void OrderEntry::LOB::Account::limit ( Order order)
inline

Place a limit order.

Parameters
orderthe limit order to place

◆ limit_fill()

virtual void OrderEntry::LOB::Account::limit_fill ( Order limit,
Order market 
)
inlinevirtual

Fill a limit order.

Parameters
limitthe limit order that is being filled
marketthe market order that fills the limit order

Reimplemented in OrderEntry::SystemAccount< Handler >, and OrderEntry::SystemAccount< OrderEntry::Connection >.

◆ limit_partial()

virtual void OrderEntry::LOB::Account::limit_partial ( Order limit,
Order market 
)
inlinevirtual

Partially fill a limit order.

Parameters
limitthe limit order that is being partially filled
marketthe market order that partially fills the limit order

Reimplemented in OrderEntry::SystemAccount< Handler >, and OrderEntry::SystemAccount< OrderEntry::Connection >.

◆ market_fill()

virtual void OrderEntry::LOB::Account::market_fill ( Order limit,
Order market 
)
inlinevirtual

Fill a market order.

Parameters
limitthe limit order that fills the market order
marketthe market order being filled

Reimplemented in OrderEntry::SystemAccount< Handler >, and OrderEntry::SystemAccount< OrderEntry::Connection >.

◆ market_partial()

virtual void OrderEntry::LOB::Account::market_partial ( Order limit,
Order market 
)
inlinevirtual

Partially fill a market order.

Parameters
limitthe limit order that partially fills the market order
marketthe market order being partially filled

Reimplemented in OrderEntry::SystemAccount< Handler >, and OrderEntry::SystemAccount< OrderEntry::Connection >.


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