![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The instruments with an order of unknown outcome, where nothing may be placed until the broker's order list is read and the instrument resolved. More...
#include <algotradelib/src/runner/execution.hpp>
Public Member Functions | |
| void | mark (const InstrumentId &id, std::string detail) |
| Records an instrument's order of unknown outcome; an existing entry keeps its first detail. | |
| bool | requires_reconcile (const InstrumentId &id) const |
| Tests whether an instrument is waiting for reconciliation. | |
| std::string_view | detail (const InstrumentId &id) const |
| Returns why an instrument is unresolved. | |
| void | resolve_after_reading_orders (const InstrumentId &id) |
| Clears an instrument; call it only after reading the broker's order list for it. | |
| std::vector< InstrumentId > | pending () const |
| Returns every instrument waiting for reconciliation. | |
| bool | empty () const noexcept |
| Tests whether nothing is unresolved. | |
The instruments with an order of unknown outcome, where nothing may be placed until the broker's order list is read and the instrument resolved.
Named cancellations are not blocked. Only resolve_after_reading_orders clears an entry; reading the list alone does not. The ledger is in memory: it does not survive the process, and an order in flight when a process is killed is never recorded. After an abnormal exit, read the broker's order list before trading; PollingLoop does this before its first send, and a FileJournal (live::bind_journaled) carries unresolved instructions across a restart for recover_runner.
Definition at line 518 of file execution.hpp.
|
inline |
Returns why an instrument is unresolved.
| id | The instrument. |
Definition at line 554 of file execution.hpp.
Referenced by mark().
|
inlinenoexcept |
Tests whether nothing is unresolved.
Definition at line 593 of file execution.hpp.
|
inline |
Records an instrument's order of unknown outcome; an existing entry keeps its first detail.
| id | The instrument. |
| detail | A description. |
Definition at line 525 of file execution.hpp.
Referenced by algotradelib::runner::recover_into().
|
inline |
Returns every instrument waiting for reconciliation.
Definition at line 580 of file execution.hpp.
|
inline |
Tests whether an instrument is waiting for reconciliation.
| id | The instrument. |
Definition at line 540 of file execution.hpp.
Referenced by algotradelib::runner::recover_into().
|
inline |
Clears an instrument; call it only after reading the broker's order list for it.
| id | The instrument. |
Definition at line 567 of file execution.hpp.