Skip to main content

duplicate_place

Function duplicate_place 

Source
pub async fn duplicate_place<U: OrderExecutor + ?Sized>(
    ud: &U,
    id: &InstrumentId,
    price: Price,
)
Expand description

A cid is used for one place at most: the second place with it is refused locally and creates nothing.

Steps and checks:

  1. place a buy limit order of one lot at price under a fresh cid. It succeeds.
  2. place with the same cid again: [Error::Rejected] with code duplicate_place, not Ok and not Unknown. Nothing was sent, so the broker holds one order of that cid.
  3. Cancel the order.

The command gate must be open, so call reconcile first.

§Panics

With [conformance:duplicate_place] <reason>.