Skip to main content

update_fee_fill_caches

Function update_fee_fill_caches 

Source
pub fn update_fee_fill_caches(
    msg: &OKXOrderMsg,
    instrument: &InstrumentAny,
    fee_cache: &mut AHashMap<Ustr, Money>,
    filled_qty_cache: &mut AHashMap<Ustr, Quantity>,
)
Expand description

Updates fee and fill caches from a raw OKX order message.

Call after parsing each message so subsequent messages in the same batch see the correct cumulative fee and filled quantity.