Skip to main content

state_of

Function state_of 

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

The state of an order by the status of the exchange.

New and the transient Triggered are working orders. A conditional order that has not fired (Untriggered) is working too, as far as this function goes: the connectors keep it in the list of stop orders (see is_untriggered). Cancelled and Deactivated are final even when part of the order was filled before. A word the connector does not know is a working order, so the bot does not place a second one in its stead.