pub fn parse_derive_position_to_report(
position: &DerivePosition,
account_id: AccountId,
ts_init: UnixNanos,
) -> Result<PositionStatusReport>Expand description
Builds a [PositionStatusReport] from a Derive position record.
Returns Ok(None) when the position is flat (zero amount) and the caller
asked for non-flat reports only.
ยงErrors
Returns an error when the position amount cannot be converted to a
Nautilus Quantity.