![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
A broker's reference to one order, used to amend or cancel it. More...
#include <algotradelib/src/core/types.hpp>
Public Member Functions | |
| std::string | str () const |
| Formats the reference for logs, as broker:primary[:secondary]. | |
Static Public Member Functions | |
| static constexpr std::string_view | broker () noexcept |
| Returns the issuing broker's name. | |
Public Attributes | |
| std::string | primary_ |
| The order number or id. | |
| std::string | secondary_ |
| A second part some brokers need, such as KIS's branch code; empty otherwise. | |
Friends | |
| bool | operator== (const OrderRef &lhs, const OrderRef &rhs) |
| Compares two references. | |
| bool | operator!= (const OrderRef &lhs, const OrderRef &rhs) |
| Compares two references for inequality. | |
A broker's reference to one order, used to amend or cancel it.
The broker is a type parameter, so a reference from one broker cannot be passed to another's session (it does not compile); a broker's asynchronous and blocking clients share one tag. Treat the parts as opaque: store, compare and hash them, but do not parse them.
| Broker | The broker's tag type, with static constexpr std::string_view name. |
|
inlinestaticconstexprnoexcept |
|
inline |
| std::string algotradelib::OrderRef< Broker >::primary_ |
The order number or id.
Definition at line 2113 of file types.hpp.
Referenced by algotradelib::BrokerSession< Client >::async_order(), algotradelib::OrderRef< kis::Broker >::operator==, algotradelib::BlockingSession< Client >::order(), and algotradelib::backtest::QueueingExecutor< Tag >::place().
| std::string algotradelib::OrderRef< Broker >::secondary_ |
A second part some brokers need, such as KIS's branch code; empty otherwise.
Definition at line 2115 of file types.hpp.
Referenced by algotradelib::OrderRef< kis::Broker >::operator==.