piker
piker copied to clipboard
Run dark cleaing loop in `pikerd` subactor
As per the final unfinished item in #402, it's obviously ideal to be able to keep dark-cleared (aka algorithmic) order processing running when a client/UI is not connected to an emsd.
We need to persist both the rt quote feed and dark clearing task with any spawned brokerd order-dialog daemon-task.
Implementation should require a slight refactor to move components from _emsd_main() into Router.maybe_open_brokerd_trades_dialogue().
Testing:
- [ ] user should be able to submit a dark order, detach the chart/client and see the order clear on the
pikerdconsole output - [ ] when a dark order is cleared when no chart is attached the order line should be removed from view on re-connect
- [ ] we may want to add notification support as is found in the
OrderMode.on_exec()handler to the daemon such that triggered orders can cause a notification that use can then use as reason (or source) for starting a client/chart?