Trait barter::portfolio::FillUpdater[][src]

pub trait FillUpdater {
    fn update_from_fill(
        &mut self,
        fill: &FillEvent
    ) -> Result<(), PortfolioError>; }
Expand description

Updates the Portfolio from an input FillEvent.

Required methods

Updates the Portfolio state using the input FillEvent. The FillEvent triggers a Position entry or exit, and the Portfolio updates key fields such as current_cash and current_value accordingly.

Implementors