A subclass of the LOB::Account that manages client state on the market server.
More...
#include <system_account.hpp>
|
std::string | username = "" |
| the user name for the account
|
|
std::string | password = "" |
| the password for the account
|
|
Handler * | handler = nullptr |
| the connection for this account
|
|
bool | is_connected = false |
| whether the account is currently logged in
|
|
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
|
|
template<typename Handler>
struct OrderEntry::SystemAccount< Handler >
A subclass of the LOB::Account that manages client state on the market server.
- Template Parameters
-
Handler | a callback handler type for passing trade event data to |
◆ SystemAccount() [1/2]
template<typename Handler >
Initialize a new system account with given handler.
- Parameters
-
username_ | the username for the account |
password_ | the password for the account |
◆ SystemAccount() [2/2]
template<typename Handler >
Initialize a new system account with given handler.
- Parameters
-
handler_ | a pointer to the handler for the system account |
◆ cancel()
void OrderEntry::LOB::Account::cancel |
( |
Order * |
order | ) |
|
|
inlineinherited |
Cancel a limit order.
- Parameters
-
◆ fill()
Fill a market order on given side with quantity and price.
- Parameters
-
side | the side of the trade |
quantity | the quantity of the trade |
price | the price the trade occurred at |
◆ limit()
void OrderEntry::LOB::Account::limit |
( |
Order * |
order | ) |
|
|
inlineinherited |
Place a limit order.
- Parameters
-
order | the limit order to place |
◆ limit_fill()
template<typename Handler >
Fill a limit order.
- Parameters
-
limit | the limit order that is being filled |
market | the market order that fills the limit order |
Reimplemented from OrderEntry::LOB::Account.
◆ limit_partial()
template<typename Handler >
Partially fill a limit order.
- Parameters
-
limit | the limit order that is being partially filled |
market | the market order that partially fills the limit order |
Reimplemented from OrderEntry::LOB::Account.
◆ market_fill()
template<typename Handler >
Fill a market order.
- Parameters
-
limit | the limit order that fills the market order |
market | the market order being filled |
Reimplemented from OrderEntry::LOB::Account.
◆ market_partial()
template<typename Handler >
Partially fill a market order.
- Parameters
-
limit | the limit order that partially fills the market order |
market | the market order being partially filled |
Reimplemented from OrderEntry::LOB::Account.
◆ table_header()
template<typename Handler >
Return the header for the account table.
- Returns
- the header value for the system account table
◆ operator<<
template<typename Handler >
std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
const SystemAccount< Handler > & |
account |
|
) |
| |
|
friend |
Write the data from the account to a stream.
- Parameters
-
stream | the stream to write the data to |
account | the account to write to the stream |
- Returns
- the stream with data from the account written to it
The documentation for this struct was generated from the following file: