Skip to main content

state_of

Function state_of 

Source
pub fn state_of(
    status: Option<&str>,
    cid: ClientOrderId,
    broker_id: &str,
    qty: Qty,
    filled: Qty,
) -> OrderState
Expand description

The state of an order from the status of the broker and the quantities.

statusState
working, nothing filledAcked
working, partly filledPartiallyFilled
filledFilled
canceledCancelled
rejectedRejected
anything else (new words of the broker)Acked, a working order: the safe reading, the bot must not place a second one in its stead