pub async fn stream_cut_degrades_until_reconcile<U, C, CFut>(
ud: &U,
rx: &mut Receiver<Envelope>,
id: &InstrumentId,
price: Price,
cut: C,
)Expand description
The stream of own orders breaks: the bot is told, the gate closes, reconcile opens it.
cut breaks the order and fill streams from the broker side, and returns once the broker has done it
(the connector then reopens the streams by itself). reopened says when the streams are open again.
Steps and checks:
subscribe_order_stateandsubscribe_executions;reopenedis awaited once for the first open.cut(). An [Event::Reconnected] arrives for the order state subscription, and one for the executions subscription.placeis [Error::Degraded] and sends nothing (active_ordersshows no order of ours).reconcile(&[])succeeds and opens the gate. A place goes through and is cancelled.
§Panics
With [conformance:stream_cut_degrades_until_reconcile] <reason>.