Skip to main content

build

Function build 

pub fn build(
    req: &PlaceStopOrderRequest,
    lot: Decimal,
    portfolio: &str,
    exchange: &str,
    now_secs: i64,
    cid: Uuid,
) -> Result<(StopOrderRequest, bool), Error>
Expand description

The wire request and whether it is a stop-limit order (true) or a stop order (false).

§Errors

[Error::Rejected] with missing_price for a StopLimit without limit_price; invalid_qty for a quantity that is not a whole number of lots; [Error::Config] for an instrument that is not a TickerClass one.