pub fn resolve_fee_currency(
fee_token: &str,
fee_amount: Decimal,
instrument: &dyn Instrument,
) -> Result<Currency>Expand description
Resolves the commission currency for a fill given the venue’s feeToken field.
HIP-4 outcome fills echo the side token (e.g. +50) as feeToken even when
the fee is zero. The side token is not a Nautilus currency and emitting it as
the commission currency would leak into OrderFilled events and persistence;
for outcome side tokens the instrument’s quote currency is always used, even
when another adapter path (such as spot-balance parsing) has registered the
side token in the global registry. Non-zero side-token fees error: the venue
does not denominate fees in side tokens. Other unknown tokens fall back to
the instrument’s quote currency only when the fee is zero.
§Errors
Returns an error when an outcome side token carries a non-zero fee, or when
fee_token cannot be resolved and fee_amount is non-zero.