A client for interacting with the direct market access server.
More...
#include <client.hpp>
A client for interacting with the direct market access server.
◆ Client()
OrderEntry::Client::Client |
( |
asio::io_context & |
context, |
|
|
std::string |
host, |
|
|
std::string |
port |
|
) |
| |
|
inline |
Create a new order entry client.
- Parameters
-
context | the IO context to run the client on |
host | the host address of the order entry server |
port | the port number the order entry server runs at |
◆ get_active_orders()
const OrderIDSet& OrderEntry::Client::get_active_orders |
( |
| ) |
const |
|
inline |
Return the set of active orders for this client connection.
- Returns
- a constant set of order IDs representing active orders
◆ get_capital()
Return the amount of capital the client currently has.
- Returns
- the amount of capital in the client's local account
◆ get_shares()
Return the number of shares the client currently has.
- Returns
- the number of shares in the client's local account
◆ has_active_order()
bool OrderEntry::Client::has_active_order |
( |
| ) |
const |
|
inline |
Return true if the client has an active order.
- Returns
- true if there is an active limit order for the account
◆ is_logged_in()
bool OrderEntry::Client::is_logged_in |
( |
| ) |
const |
|
inline |
Return true if the client is authorized, false otherwise.
- Returns
- true if the client is authorized to send messages
◆ send()
template<class T , typename ... Args>
void OrderEntry::Client::send |
( |
Args &&... |
args | ) |
|
|
inline |
Write a message asynchronously (non-blocking).
- Template Parameters
-
T | the class of the message to send |
- Parameters
-
...args | the initialization parameters for the object |
◆ send_sync()
template<class T , typename ... Args>
void OrderEntry::Client::send_sync |
( |
Args &&... |
args | ) |
|
|
inline |
Write a message synchronously (blocking).
- Template Parameters
-
T | the class of the message to send |
- Parameters
-
...args | the initialization parameters for the object |
◆ set_capital()
Set the client capital to a new value.
- Parameters
-
capital_ | the new amount of capital for the client |
◆ set_shares()
Set the client shares to a new value.
- Parameters
-
shares_ | the new amount of shares for the client |
The documentation for this class was generated from the following file: