|
| | Backend ()=default |
| |
| virtual | ~Backend ()=default |
| |
| | Backend (const Backend &)=delete |
| |
| Backend & | operator= (const Backend &)=delete |
| |
| virtual std::string_view | name () const noexcept=0 |
| |
| virtual Result< void, std::string > | open (const BackendOptions &opts)=0 |
| | Opens or creates the store and brings its schema up to date.
|
| |
| virtual Result< void, std::string > | session_open (const SessionOpen &s)=0 |
| |
| virtual Result< void, std::string > | instruments (std::uint64_t session_id, std::span< const Instrument > table)=0 |
| | The instrument table of this session, by dense id.
|
| |
| virtual void | begin ()=0 |
| | One batch. StoreThread calls begin(), then zero or more records, then commit().
|
| |
| virtual void | fill (const FillRecord &r)=0 |
| |
| virtual void | order (const OrderRecord &r)=0 |
| |
| virtual void | position (const PositionRecord &r)=0 |
| |
| virtual void | kill (const KillRecord &r)=0 |
| |
| virtual void | funding (const FundingRecord &) |
| | A funding payment.
|
| |
| virtual void | replayed (const ReplayedRecord &) |
| | A venue's execution replay ended complete.
|
| |
| virtual void | param (const ParamRecord &) |
| | A strategy parameter update the engine applied. The default drops it.
|
| |
| virtual void | reject (const RejectRecord &) |
| | An order refused by the pre-trade checks or by its venue. The default drops it.
|
| |
| virtual void | limits (const LimitsRecord &) |
| | An operator's risk limit change the engine applied. The default drops it.
|
| |
| virtual void | markout (const MarkoutRecord &) |
| | The mid at or after a fill ([engine] markout_ms).
|
| |
| virtual void | capacity (const CapacityRecord &) |
| | A minute of one account's capacity price ([capacity]). The default drops it.
|
| |
| virtual void | context_names (const ContextNamesRecord &) |
| | The names of the strategy's quote context values (FillRecord::order_context).
|
| |
| virtual void | commit ()=0 |
| |
| virtual void | idle (std::int64_t) |
| | StoreThread calls it when the ring is empty, outside a batch, with the wall clock: a backend may do one small piece of housekeeping (the SQLite backend's [storage] retention_days) and must return within milliseconds, since records wait in the ring meanwhile.
|
| |
| virtual Result< void, std::string > | session_close (const SessionClose &s)=0 |
| |
| virtual void | close ()=0 |
| |
| virtual std::uint64_t | rows () const noexcept=0 |
| | Any thread: fastmm-live reads them for the status file while the store thread writes.
|
| |
| virtual std::uint64_t | errors () const noexcept=0 |
| |
| virtual std::string | last_error () const =0 |
| |