Skip to main content

build_maker_fill_report

Function build_maker_fill_report 

Source
pub fn build_maker_fill_report(
    mo: &PolymarketMakerOrder,
    trade_id: &str,
    trader_side: PolymarketLiquiditySide,
    trade_side: PolymarketOrderSide,
    taker_asset_id: &str,
    account_id: AccountId,
    instrument_id: InstrumentId,
    price_precision: u8,
    size_precision: u8,
    currency: Currency,
    liquidity_side: LiquiditySide,
    ts_event: UnixNanos,
    ts_init: UnixNanos,
) -> Result<FillReport>
Expand description

Builds a [FillReport] from a PolymarketMakerOrder and trade-level context.

Used by both the WS stream handler and REST fill report generation since both share the same PolymarketMakerOrder type for maker fills. Maker fills never pay commission per Polymarket’s fee rules.

§Errors

Returns an error if the computed commission cannot be represented as [Money].

§Panics

Panics if the maker order or generated trade identifier is invalid.