Skip to main content

parse_order_status_report

Function parse_order_status_report 

Source
pub fn parse_order_status_report(
    order: &Order,
    instrument: &InstrumentAny,
    account_id: AccountId,
    ts_init: UnixNanos,
) -> Result<OrderStatusReport>
Expand description

Parses a Coinbase Order into an [OrderStatusReport].

Uses the given instrument’s price and size precision to build quantities and prices, and derives the limit price from the order configuration when present. Timestamps default to ts_init when Coinbase omits them.

§Errors

Returns an error when any numeric field cannot be parsed against the instrument precision.