#[unsafe(no_mangle)]pub unsafe extern "C" fn synthetic_instrument_new(
symbol: Symbol,
price_precision: u8,
components_ptr: *const c_char,
formula_ptr: *const c_char,
ts_event: u64,
ts_init: u64,
) -> *mut SyntheticInstrumentExpand description
Creates a new SyntheticInstrument from the given components and formula.
§Panics
Panics if the formula is invalid for the given components.
§Safety
This function assumes:
components_ptris a valid C string pointer of a JSON format list of strings.formula_ptris a valid C string pointer.
Returns an owning pointer to the heap-allocated SyntheticInstrument which the
caller must eventually pass to synthetic_instrument_drop.