Skip to main content

parse_derive_order_to_report

Function parse_derive_order_to_report 

Source
pub fn parse_derive_order_to_report(
    order: &DeriveOrder,
    account_id: AccountId,
    ts_init: UnixNanos,
) -> Result<OrderStatusReport>
Expand description

Builds an [OrderStatusReport] from a Derive order record.

client_order_id is sourced from the label field on the order when the label is non-empty; callers that need a specific client_order_id should override via with_client_order_id after this call.

ยงErrors

Returns an error when any decimal field cannot be converted to a Nautilus Price or Quantity.