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 a valid Nautilus identifier; callers that need a specific client_order_id should override via with_client_order_id after this call. Trailing zero padding is removed without changing the value.

ยงErrors

Returns an error if the venue order identifier is invalid or the amount or filled amount cannot be converted to a Nautilus Quantity.