apply_reserve_update_events#
API documentation for tradeexecutor.ethereum.balance_update.apply_reserve_update_events Python function.
- apply_reserve_update_events(state, reserve_update_events, default_price=1.0)[source]#
- Apply deposit and withdraws on reserves in the portfolio. - Updates - ReservePositioninstance 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) – 
- reserve_update_events (List[ReserveUpdateEvent]) – 
 
- Return type: