apply_sync_events#

API documentation for tradeexecutor.testing.dummy_wallet.apply_sync_events Python function.

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:
Return type:

List[BalanceUpdate]