pub async fn active_orders_lifecycle<U: OrderExecutor + ?Sized>(
ud: &U,
id: &InstrumentId,
price: Price,
)Expand description
active_orders follows the order: a placed order is listed with its details, a cancelled one is gone.
Steps and checks:
- Place a buy limit order, three lots, at
price(rate-limit refusals are waited out and retried under a fresh cid). active_orders()lists the order under its cid, with the same instrument, sideBuy, three lots and priceprice, and a state that is notCancelled,FilledorRejected.- Cancel it.
active_orders()no longer lists it.
price must be far from the market and accepted by the mock. The command gate must be open, so
call reconcile first. The mock must keep placed orders in its active list.
§Panics
With [conformance:active_orders_lifecycle] <reason> when a call fails or a check fails.
§Examples
brokapi_conformance::reconcile(&ud).await;
brokapi_conformance::active_orders_lifecycle(&ud, &sber, Price::from(100)).await;