pub fn trade(
value: Value,
instrument: &BinaryOption,
ts_init: UnixNanos,
) -> Result<Option<TradeTick>>Expand description
Builds one trade tick from a public trade payload.
Returns Ok(None) for a block trade. A trade price and size must match the instrument
precision exactly.
ยงErrors
Returns an error if the payload is malformed, the YES and NO prices are inconsistent, the taker direction is missing or inconsistent, a price or size is outside its exact domain, or the timestamp is missing or invalid.