Skip to main content

create_ib_conditions

Function create_ib_conditions 

Source
pub fn create_ib_conditions(
    conditions_data: &Value,
) -> Result<Vec<OrderCondition>>
Expand description

Create IB order conditions from a list of condition dictionaries.

§Arguments

  • conditions_data - A JSON array of condition dictionaries

§Returns

A vector of OrderCondition enum variants ready to be encoded into the order.

§Errors

Returns an error if conditions_data is not an array or if any condition is invalid.