pub fn parse_fill_report(
trade: &PolymarketTradeReport,
instrument_id: InstrumentId,
account_id: AccountId,
client_order_id: Option<ClientOrderId>,
price_precision: u8,
size_precision: u8,
currency: Currency,
taker_fee_rate: Decimal,
fee_exponent: f64,
ts_init: UnixNanos,
) -> Result<FillReport>Expand description
Parses a PolymarketTradeReport into a [FillReport].
Produces one fill report for the overall trade. The trade_id is
derived from the Polymarket trade ID. Commission is computed from the
instrument’s effective taker fee rate, fee exponent, and fill notional.
§Errors
Returns an error if the computed commission cannot be represented as [Money].
§Panics
Panics if the trade identifiers are invalid.