Skip to main content

reconcile

Function reconcile 

Source
pub async fn reconcile<U: OrderExecutor + ?Sized>(ud: &U)
Expand description

Reconcile: an empty ledger touches nothing, and an unknown cid is reported as closed offline.

Checks:

  • reconcile(&[]) succeeds and reports no confirmed and no closed_offline orders;
  • reconcile(&[ghost]) with a random cid the broker has never seen succeeds and lists the cid in closed_offline.

foreign orders are not checked. The account at the mock must have no orders of ours.

A successful reconcile also opens the command gate of the connector. That is why this scenario is the first step of every scenario that sends trading commands: before it, those commands fail with [brokapi_core::Error::NotReconciled].

§Panics

With [conformance:reconcile] <reason> when a call fails or the report is wrong.

§Examples

brokapi_conformance::reconcile(&ud).await;