apply_sync_events#
- apply_sync_events(state, new_reserves, default_price=1.0)[source]#
Apply deposit and withdraws on reserves in the portfolio.
Updates :yp:class:`ReservePosition` instance to reflect the latest available balance
Generates balance update events needed to calculate inflows/outflows
Marks the last treasury updated at
TODO: This needs to be refactored as is partially the old treasury sync code.
- Parameters:
default_price – Set the reserve currency price for new reserves.
state (State) –
new_reserves (List[ReserveUpdateEvent]) –
- Return type: