Skip to main content

parse_fill_report

Function parse_fill_report 

Source
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,
    ts_init: UnixNanos,
) -> 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 and the fill notional.