pub trait FeeModel {
// Required method
fn compute_fee(
&self,
price: Decimal,
quantity: Decimal,
contract_size: Decimal,
) -> Decimal;
}Expand description
Computes the trading fee for a single fill.
§Arguments
price- Execution price per unit of the underlying.quantity- Number of contracts (or shares/units) filled.contract_size- Multiplier converting contracts to underlying units (e.g. 100 for standard equity options). UseDecimal::ONEfor spot.