Skip to main content

instrument_fee_exponent

Function instrument_fee_exponent 

Source
pub fn instrument_fee_exponent(instrument: &InstrumentAny) -> Result<Decimal>
Expand description

Returns the fee-schedule exponent for a Polymarket instrument. Polymarket stores the exponent as a decimal string in info.fee_schedule.exponent at parse time. This reader also accepts legacy numeric metadata. Defaults to 1 when the schedule is absent so the fee curve degenerates to the simple fee = C * rate * p * (1 - p) form used by compute_commission.

ยงErrors

Returns an error if a present schedule has a missing, invalid, or negative exponent.