|
| | QuoteManager (const QuoteParams &p={}) noexcept |
| |
| const QuoteParams & | params () const noexcept |
| |
| void | set_params (const QuoteParams &p) noexcept |
| |
| const QuoteStats & | stats () const noexcept |
| |
| void | set_replace (InstrumentId id, bool on) noexcept |
| | Whether the instrument's venue amends in place (default true; supports_replace still applies).
|
| |
| bool | replaces (InstrumentId id) const noexcept |
| |
| template<class Placer > |
| std::uint32_t | reconcile (const Instrument &inst, const DesiredQuotes &desired, const Oms &oms, Timestamp now, Placer &&place) noexcept |
| | Reconciles desired vs resting for one instrument. Returns the number of actions placed.
|
| |
| template<class Placer > |
| std::uint32_t | pull_quotes (const Instrument &inst, const Oms &oms, Placer &&place, bool keep_desired=false) noexcept |
| | Cancels every working quote on the instrument and suppresses re-quoting until the next reconcile().
|
| |
| template<class Placer > |
| std::uint32_t | resume (const Instrument &inst, const Oms &oms, Timestamp now, Placer &&place) noexcept |
| | Re-applies the desired quotes kept by pull_quotes(keep_desired). Returns the actions placed.
|
| |
| bool | resumable (InstrumentId id) const noexcept |
| |
| bool | starved () const noexcept |
| | Instruments whose quotes were held back for want of an order token, oldest first.
|
| |
| std::size_t | starved_count () const noexcept |
| |
| InstrumentId | pop_starved () noexcept |
| | Takes the oldest starved instrument off the queue (the caller checks starved() first).
|
| |
| template<class Placer > |
| std::uint32_t | retry (const Instrument &inst, const Oms &oms, Timestamp now, Placer &&place) noexcept |
| | Re-applies the last desired quotes of an instrument popped from the starved queue; one that was pulled meanwhile stays pulled.
|
| |
| template<class Placer > |
| void | on_order_update (const OmsUpdate &u, const Instrument &inst, const Oms &oms, Timestamp now, Placer &&place) noexcept |
| | Feed every OmsUpdate here.
|
| |
| Handle< Order > | slot_handle (InstrumentId id, Side s, std::uint32_t level) const noexcept |
| |
| bool | pulled (InstrumentId id) const noexcept |
| |
| const DesiredQuotes & | desired (InstrumentId id) const noexcept |
| | The last ladder reconcile() applied to the instrument (empty after a pull).
|
| |
| bool | starved (InstrumentId id) const noexcept |
| | The instrument waits for an order token (a New or Replace was rate-limited).
|
| |
| bool | backing_off (InstrumentId id, Side s, Timestamp now) const noexcept |
| | The side is in its venue-reject backoff at now.
|
| |
Feed every OmsUpdate here.
A terminal update frees the slot it belonged to and, if a target was recorded for it (cancel-then-new, or a requote that met the order pending), places the New now. The ack of an order that was pending at a requote applies the recorded target. While the instrument is pulled, an order that has just become working is cancelled instead.
< the venue takes this side
The terminal order was this slot's unless the slot already holds a newer live order. Ids are not compared: a replace changes the order's id, and a stale id used to drop the update and leave the slot waiting for a terminal state forever.